1 package # hide from PAUSE
4 use base qw/DBIx::Class::Schema/;
8 __PACKAGE__->load_classes(qw/
18 { 'DBICTest::Schema' => [qw/
29 'ArtistUndirectedMap',
34 qw/SelfRefAlias TreeLike TwoKeyTreeLike/
40 if ($ENV{"DBICTEST_SQLT_DEPLOY"}) {
41 return $schema->next::method(@_);
43 open IN, "t/lib/sqlite.sql";
45 { local $/ = undef; $sql = <IN>; }
47 $self->storage->dbh->do($_) for split(/;\n/, $sql);
54 $self->storage->dbh->do("PRAGMA synchronous = OFF");
56 $self->populate('Artist', [
57 [ qw/artistid name/ ],
58 [ 1, 'Caterwauler McCrae' ],
59 [ 2, 'Random Boy Band' ],
63 $self->populate('CD', [
64 [ qw/cdid artist title year/ ],
65 [ 1, 1, "Spoonful of bees", 1999 ],
66 [ 2, 1, "Forkful of bees", 2001 ],
67 [ 3, 1, "Caterwaulin' Blues", 1997 ],
68 [ 4, 2, "Generic Manufactured Singles", 2001 ],
69 [ 5, 3, "Come Be Depressed With Us", 1998 ],
72 $self->populate('LinerNotes', [
73 [ qw/liner_id notes/ ],
74 [ 2, "Buy Whiskey!" ],
76 [ 5, "Kill Yourself!" ],
79 $self->populate('Tag', [
92 $self->populate('TwoKeys', [
99 $self->populate('FourKeys', [
100 [ qw/foo bar hello goodbye/ ],
105 $self->populate('OneKey', [
106 [ qw/id artist cd/ ],
112 $self->populate('SelfRef', [
118 $self->populate('SelfRefAlias', [
119 [ qw/self_ref alias/ ],
123 $self->populate('ArtistUndirectedMap', [
128 $self->populate('Producer', [
129 [ qw/producerid name/ ],
130 [ 1, 'Matt S Trout' ],
131 [ 2, 'Bob The Builder' ],
132 [ 3, 'Fred The Phenotype' ],
135 $self->populate('CD_to_Producer', [
142 $self->populate('TreeLike', [
143 [ qw/id parent name/ ],
150 $self->populate('Track', [
151 [ qw/trackid cd position title/ ],
152 [ 4, 2, 1, "Stung with Success"],
153 [ 5, 2, 2, "Stripy"],
154 [ 6, 2, 3, "Sticky Honey"],
155 [ 7, 3, 1, "Yowlin"],
156 [ 8, 3, 2, "Howlin"],
157 [ 9, 3, 3, "Fowlin"],
158 [ 10, 4, 1, "Boring Name"],
159 [ 11, 4, 2, "Boring Song"],
160 [ 12, 4, 3, "No More Ideas"],
162 [ 14, 5, 2, "Under The Weather"],
163 [ 15, 5, 3, "Suicidal"],
164 [ 16, 1, 1, "The Bees Knees"],
165 [ 17, 1, 2, "Apiary"],
166 [ 18, 1, 3, "Beehind You"],
169 $self->populate('Link', [
174 $self->populate('Bookmark', [