File: MyTimeline.pm

package info (click to toggle)
liborlite-migrate-perl 1.10-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 248 kB
  • ctags: 152
  • sloc: perl: 1,885; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 540 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package t::lib::MyTimeline;

use strict;
use warnings;
use ORLite::Migrate::Timeline ();

use vars qw{$VERSION @ISA};
BEGIN {
	$VERSION = '1.09';
	@ISA     = 'ORLite::Migrate::Timeline';
}

sub upgrade1 {
	$_[0]->do($_) foreach split /;\s+/, <<'END_SQL';

create table foo (
	id integer not null primary key,
	name varchar(32) not null
);

insert into foo values ( 1, 'foo' )

END_SQL
	return 1;
}

sub upgrade2 {
	shift->do("insert into foo values ( 2, 'bar' )");
}

sub upgrade3 {
	shift->do("insert into foo values ( 3, 'baz' )");
}

1;