Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema.pm
1 package # hide from PAUSE
2     DBICTest::Schema;
3
4 # load early so that `perl -It/lib -MDBICTest::Schema` keeps  working
5 use ANFANG;
6
7 use strict;
8 use warnings;
9 no warnings 'qw';
10
11 use base 'DBICTest::BaseSchema';
12
13 __PACKAGE__->mk_group_accessors(simple => 'custom_attr');
14
15 __PACKAGE__->load_classes(qw/
16   Artist
17   SequenceTest
18   BindType
19   Employee
20   CD
21   Genre
22   Bookmark
23   Link
24   #dummy
25   Track
26   Tag
27   Year2000CDs
28   Year1999CDs
29   CustomSql
30   Money
31   TimestampPrimaryKey
32   /,
33   { 'DBICTest::Schema' => [qw/
34     LinerNotes
35     Artwork
36     Artwork_to_Artist
37     Image
38     Lyrics
39     LyricVersion
40     OneKey
41     #dummy
42     TwoKeys
43     Serialized
44   /]},
45   (
46     'FourKeys',
47     'FourKeys_to_TwoKeys',
48     '#dummy',
49     'SelfRef',
50     'ArtistUndirectedMap',
51     'ArtistSourceName',
52     'ArtistSubclass',
53     'Producer',
54     'CD_to_Producer',
55     'Dummy',    # this is a real result class we remove in the hook below
56   ),
57   qw/SelfRefAlias TreeLike TwoKeyTreeLike Event NoPrimaryKey/,
58   qw/Collection CollectionObject TypedObject Owners BooksInLibrary/,
59   qw/ForceForeign Encoded/,
60 );
61
62 sub sqlt_deploy_hook {
63   my ($self, $sqlt_schema) = @_;
64
65   $sqlt_schema->drop_table('dummy');
66 }
67
68 1;