Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions migrations/src/main/liquibase/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ databaseChangeLog:
- sqlFile:
path: ../sql/rules.down.sql
relativeToChangelogFile: true
- changeSet:
id: 2
author: madhead
changes:
- sqlFile:
path: ../sql/spock.up.sql
relativeToChangelogFile: true
rollback:
- sqlFile:
path: ../sql/spock.down.sql
relativeToChangelogFile: true
3 changes: 3 additions & 0 deletions migrations/src/main/sql/spock.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DELETE FROM rules
WHERE player1 IN ('spock', 'lizard')
OR player2 IN ('spock', 'lizard');
21 changes: 21 additions & 0 deletions migrations/src/main/sql/spock.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
INSERT INTO rules
VALUES ('rock', 'spock', 'spock'),
('rock', 'lizard', 'rock'),

('paper', 'spock', 'paper'),
('paper', 'lizard', 'lizard'),

('scissors', 'spock', 'spock'),
('scissors', 'lizard', 'lizard'),

('spock', 'rock', 'spock'),
('spock', 'paper', 'paper'),
('spock', 'scissors', 'spock'),
('spock', 'spock', NULL),
('spock', 'lizard', 'lizard'),

('lizard', 'rock', 'rock'),
('lizard', 'paper', 'lizard'),
('lizard', 'scissors', 'scissors'),
('lizard', 'spock', 'lizard'),
('lizard', 'lizard', NULL);