ensembl-hive  2.7.0
Meta.pm
Go to the documentation of this file.
1 =head1 LICENSE
2 
3 See the NOTICE file distributed with this work for additional information
4 regarding copyright ownership.
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 
18 =cut
19 
20 package Xref::Schema::Result::Meta;
21 
22 =head1 NAME
23 
25 
26 =cut
27 
28 use strict;
29 use warnings;
30 use utf8;
31 
32 use base 'DBIx::Class::Core';
33 
34 =head1 TABLE: C<meta>
35 
36 =cut
37 
38 __PACKAGE__->table("meta");
39 
40 =head1 ACCESSORS
41 
42 =head2 meta_id
43 
44  data_type: 'integer'
45  is_auto_increment: 1
46  is_nullable: 0
47 
48 =head2 species_id
49 
50  data_type: 'integer'
51  default_value: 1
52  extra: {unsigned => 1}
53  is_nullable: 1
54 
55 =head2 meta_key
56 
57  data_type: 'varchar'
58  is_nullable: 0
59  size: 40
60 
61 =head2 meta_value
62 
63  data_type: 'varchar'
64  is_nullable: 0
65  size: 255
66 
67 =head2 date
68 
69  data_type: 'datetime'
70  datetime_undef_if_invalid: 1
71  is_nullable: 0
72 
73 =cut
74 
75 __PACKAGE__->add_columns(
76  "meta_id",
77  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
78  "species_id",
79  {
80  data_type => "integer",
81  default_value => 1,
82  extra => { unsigned => 1 },
83  is_nullable => 1,
84  },
85  "meta_key",
86  { data_type => "varchar", is_nullable => 0, size => 40 },
87  "meta_value",
88  { data_type => "varchar", is_nullable => 0, size => 255 },
89  "date",
90  {
91  data_type => "datetime",
92  datetime_undef_if_invalid => 1,
93  is_nullable => 0,
94  },
95 );
96 
97 =head1 PRIMARY KEY
98 
99 =over 4
100 
101 =item * L</meta_id>
102 
103 =back
104 
105 =cut
106 
107 __PACKAGE__->set_primary_key("meta_id");
108 
109 =head1 UNIQUE CONSTRAINTS
110 
111 =head2 C<species_key_value_idx>
112 
113 =over 4
114 
115 =item * L</meta_id>
116 
117 =item * L</species_id>
118 
119 =item * L</meta_key>
120 
121 =item * L</meta_value>
122 
123 =back
124 
125 =cut
126 
127 __PACKAGE__->add_unique_constraint(
128  "species_key_value_idx",
129  ["meta_id", "species_id", "meta_key", "meta_value"],
130 );
131 
132 1;
Xref::Schema::Result::Meta
Definition: Meta.pm:5