wip
This commit is contained in:
9
pgutil/test-migrations/000.sql
Normal file
9
pgutil/test-migrations/000.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE users(
|
||||
UserID BIGINT NOT NULL PRIMARY KEY,
|
||||
Email TEXT NOT NULL UNIQUE);
|
||||
|
||||
CREATE TABLE user_notes(
|
||||
UserID BIGINT NOT NULL REFERENCES users(UserID),
|
||||
NoteID BIGINT NOT NULL,
|
||||
Note Text NOT NULL,
|
||||
PRIMARY KEY(UserID,NoteID));
|
||||
1
pgutil/test-migrations/001.sql
Normal file
1
pgutil/test-migrations/001.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO users(UserID, Email) VALUES (1, 'a@b.com'), (2, 'c@d.com');
|
||||
1
pgutil/test-migrations/002.sql
Normal file
1
pgutil/test-migrations/002.sql
Normal file
@@ -0,0 +1 @@
|
||||
DELETE FROM users WHERE UserID=1;
|
||||
Reference in New Issue
Block a user