-
Notifications
You must be signed in to change notification settings - Fork 14
/
sample_changeLog.sql
53 lines (49 loc) · 1.85 KB
/
sample_changeLog.sql
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--liquibase formatted sql
--changeset SteveZ:45555-createtablecontacts
--comment: Created table "contacts" for application "ABC"
CREATE TABLE contacts (
id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
firstname VARCHAR(255),
lastname VARCHAR(255)
);
--rollback drop table contacts;
--changeset MikeO:45556-altertableactor
--comment: Created table "actor" for feature "XYZ"
ALTER TABLE actor
ADD COLUMN twitter VARCHAR(15);
--rollback alter table actor drop column twitter;
--changeset AmyS:45678-createtablecolors
--comment: Created table "colors" for feature "XYZ"
CREATE TABLE colors (
id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
bcolor VARCHAR,
fcolor VARCHAR
);
--rollback drop table colors;
--changeset ChristineM:45679-insertcolors
--comment: dml for table "colors" for feature "BCD"
INSERT INTO colors (bcolor, fcolor)
VALUES
('red', 'red'),
('red', 'red'),
('red', NULL),
(NULL, 'red'),
('red', 'green'),
('red', 'blue'),
('green', 'red'),
('green', 'blue'),
('green', 'green'),
('blue', 'red'),
('blue', 'green'),
('blue', 'blue');
--rollback delete from colors where bcolor = 'red' and fcolor = 'red';
--rollback delete from colors where bcolor = 'red' and fcolor IS NULL;
--rollback delete from colors where bcolor IS NULL and fcolor = 'red';
--rollback delete from colors where bcolor = 'red' and fcolor = 'green';
--rollback delete from colors where bcolor = 'red' and fcolor = 'blue';
--rollback delete from colors where bcolor = 'green' and fcolor = 'red';
--rollback delete from colors where bcolor = 'green' and fcolor = 'blue';
--rollback delete from colors where bcolor = 'green' and fcolor = 'green';
--rollback delete from colors where bcolor = 'blue' and fcolor = 'red';
--rollback delete from colors where bcolor = 'blue' and fcolor = 'green';
--rollback delete from colors where bcolor = 'blue' and fcolor = 'blue';