<commit_before>package EnsEMBL::ORM::Rose::Object::Species;

### NAME: EnsEMBL::ORM::Rose::Object::Species
### ORM class for the species table in ensembl_production

### STATUS: Stable 

use strict;
use warnings;

use base qw(EnsEMBL::ORM::Rose::Object::Trackable);

use constant ROSE_DB_NAME => 'production';

## Define schema
__PACKAGE__->meta->setup(
  table       => 'species',

  columns     => [
    species_id        => {type => 'serial', primary_key => 1, not_null => 1}, 
    db_name           => {type => 'varchar', 'length' => 255, not_null => 1},
    common_name       => {type => 'varchar', 'length' => 255, not_null => 1},
    web_name          => {type => 'varchar', 'length' => 255, not_null => 1},
    scientific_name   => {type => 'varchar', 'length' => 255, not_null => 1},
    production_name   => {type => 'varchar', 'length' => 255, not_null => 1},
    url_name          => {type => 'varchar', 'length' => 255, not_null => 1},
    taxon             => {type => 'varchar', 'length' => 20 },
    species_prefix    => {type => 'varchar', 'length' => 20 },
    is_current        => {type => 'integer'},
  ],
  
  unique_key            => ['db_name'],
  title_column          => 'web_name',
  inactive_flag_column  => 'is_current',

  relationships         => [
    changelog         => {
      'type'        => 'many to many',
      'map_class'   => 'EnsEMBL::ORM::Rose::Object::ChangelogSpecies',
      'map_from'    => 'species',
      'map_to'      => 'changelog',
    },
    alias             => {
      'type'        => 'one to many',
      'class'       => 'EnsEMBL::ORM::Rose::Object::SpeciesAlias',
      'column_map'  => {'species_id' => 'species_id'}
    },
    meta_key          => {
      'type'        => 'many to many',
      'map_class'   => 'EnsEMBL::ORM::Rose::Object::MetaKeySpecies',
      'map_from'    => 'species',
      'map_to'      => 'meta_key',
    },
    analysis_web_data => {
      'type'        => 'one to many',
      'class'       => 'EnsEMBL::ORM::Rose::Object::AnalysisWebData',
      'column_map'  => {'species_id' => 'species_id'}
    }
  ],
);

1;<commit_msg>new relationship added for attrib_type<commit_after>package EnsEMBL::ORM::Rose::Object::Species;

### NAME: EnsEMBL::ORM::Rose::Object::Species
### ORM class for the species table in ensembl_production

### STATUS: Stable 

use strict;
use warnings;

use base qw(EnsEMBL::ORM::Rose::Object::Trackable);

use constant ROSE_DB_NAME => 'production';

## Define schema
__PACKAGE__->meta->setup(
  table       => 'species',

  columns     => [
    species_id        => {type => 'serial', primary_key => 1, not_null => 1}, 
    db_name           => {type => 'varchar', 'length' => 255, not_null => 1},
    common_name       => {type => 'varchar', 'length' => 255, not_null => 1},
    web_name          => {type => 'varchar', 'length' => 255, not_null => 1},
    scientific_name   => {type => 'varchar', 'length' => 255, not_null => 1},
    production_name   => {type => 'varchar', 'length' => 255, not_null => 1},
    url_name          => {type => 'varchar', 'length' => 255, not_null => 1},
    taxon             => {type => 'varchar', 'length' => 20 },
    species_prefix    => {type => 'varchar', 'length' => 20 },
    attrib_type_id    => {type => 'integer', 'length' => 10 },
    is_current        => {type => 'integer'},
  ],
  
  unique_key            => ['db_name'],
  title_column          => 'web_name',
  inactive_flag_column  => 'is_current',

  relationships         => [
    changelog         => {
      'type'        => 'many to many',
      'map_class'   => 'EnsEMBL::ORM::Rose::Object::ChangelogSpecies',
      'map_from'    => 'species',
      'map_to'      => 'changelog',
    },
    alias             => {
      'type'        => 'one to many',
      'class'       => 'EnsEMBL::ORM::Rose::Object::SpeciesAlias',
      'column_map'  => {'species_id' => 'species_id'}
    },
    meta_key          => {
      'type'        => 'many to many',
      'map_class'   => 'EnsEMBL::ORM::Rose::Object::MetaKeySpecies',
      'map_from'    => 'species',
      'map_to'      => 'meta_key',
    },
    analysis_web_data => {
      'type'        => 'one to many',
      'class'       => 'EnsEMBL::ORM::Rose::Object::AnalysisWebData',
      'column_map'  => {'species_id' => 'species_id'}
    },
    attrib_type       => {
      'type'        => 'many to one',
      'class'       => 'EnsEMBL::ORM::Rose::Object::AttribType',
      'column_map'  => {'attrib_type_id' => 'attrib_type_id'}
    }
  ],
);

1;
{'fraction_non_alphanumeric': 0.19061323887535975, 'fraction_numerical': 0.014168696037192827, 'mean_word_length': 2.4700460829493087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4222286', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1535, 'n_words': 304}