-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigrations.sql
More file actions
24 lines (20 loc) · 760 Bytes
/
migrations.sql
File metadata and controls
24 lines (20 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--liquibase formatted sql
--changeset protomouse:1
CREATE TABLE Recipients (
address VARCHAR(255) CHARSET utf8 COLLATE utf8_general_ci NOT NULL,
status ENUM('bouncing', 'deliverable') NOT NULL,
PRIMARY KEY (address)
) ENGINE=InnoDB;
--rollback DROP TABLE Recipients;
--changeset protomouse:2
CREATE TABLE Bounces (
id VARCHAR(255) CHARSET ascii COLLATE ascii_general_ci NOT NULL,
type VARCHAR(255) NOT NULL,
subType VARCHAR(255) NOT NULL,
timestamp DATETIME NOT NULL,
RecipientAddress VARCHAR(255) CHARSET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (id),
INDEX RecipientAddress (RecipientAddress),
FOREIGN KEY (RecipientAddress) REFERENCES Recipients(address) ON DELETE CASCADE
) ENGINE=InnoDB;
--rollback DROP TABLE Bounces;