| 1 | 13 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Biblio::Zotero::DB::Schema::Result::Creator; | ||
| 3 | 13 | $Biblio::Zotero::DB::Schema::Result::Creator::VERSION = '0.004'; | |
| 4 | # Created by DBIx::Class::Schema::Loader | ||
| 5 | # DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
| 6 | |||
| 7 | |||
| 8 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 13 | ▶ | use base 'DBIx::Class::Core'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | |||
| 14 | 13 | __PACKAGE__->table("creators"); | |
| 15 | |||
| 16 | |||
| 17 | 13 | __PACKAGE__->add_columns( | |
| 18 | "creatorid", | ||
| 19 | { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, | ||
| 20 | "creatordataid", | ||
| 21 | { data_type => "int", is_foreign_key => 1, is_nullable => 0 }, | ||
| 22 | "dateadded", | ||
| 23 | { | ||
| 24 | data_type => "timestamp", | ||
| 25 | default_value => \"current_timestamp", | ||
| 26 | is_nullable => 0, | ||
| 27 | }, | ||
| 28 | "datemodified", | ||
| 29 | { | ||
| 30 | data_type => "timestamp", | ||
| 31 | default_value => \"current_timestamp", | ||
| 32 | is_nullable => 0, | ||
| 33 | }, | ||
| 34 | "clientdatemodified", | ||
| 35 | { | ||
| 36 | data_type => "timestamp", | ||
| 37 | default_value => \"current_timestamp", | ||
| 38 | is_nullable => 0, | ||
| 39 | }, | ||
| 40 | "libraryid", | ||
| 41 | { data_type => "int", is_nullable => 1 }, | ||
| 42 | "key", | ||
| 43 | { data_type => "text", is_nullable => 0 }, | ||
| 44 | ); | ||
| 45 | |||
| 46 | |||
| 47 | 13 | __PACKAGE__->set_primary_key("creatorid"); | |
| 48 | |||
| 49 | |||
| 50 | 13 | __PACKAGE__->add_unique_constraint("libraryid_key_unique", ["libraryid", "key"]); | |
| 51 | |||
| 52 | |||
| 53 | 13 | __PACKAGE__->belongs_to( | |
| 54 | "creatordataid", | ||
| 55 | "Biblio::Zotero::DB::Schema::Result::CreatorData", | ||
| 56 | { creatordataid => "creatordataid" }, | ||
| 57 | { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, | ||
| 58 | ); | ||
| 59 | |||
| 60 | |||
| 61 | 13 | __PACKAGE__->has_many( | |
| 62 | "item_creators", | ||
| 63 | "Biblio::Zotero::DB::Schema::Result::ItemCreator", | ||
| 64 | { "foreign.creatorid" => "self.creatorid" }, | ||
| 65 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 66 | ); | ||
| 67 | |||
| 68 | |||
| 69 | # Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-07-02 23:02:38 | ||
| 70 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mwOJUSAgJ5GdL3mOqvtqKw | ||
| 71 | |||
| 72 | |||
| 73 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 74 | 13 | 1; | |
| 75 | |||
| 76 | __END__ | ||