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