Define email_singups table

This commit is contained in:
Kitaiti Makoto 2022-01-04 22:00:30 +09:00
parent 355fd7cb1d
commit 2a31a7b601
4 changed files with 20 additions and 2 deletions

View File

@ -1 +1 @@
-- This file should undo anything in `up.sql` DROP TABLE email_signups;

View File

@ -1 +1,9 @@
-- Your SQL goes here CREATE TABLE email_signups (
id SERIAL PRIMARY KEY,
email VARCHAR NOT NULL,
token VARCHAR NOT NULL,
expiration_date TIMESTAMP NOT NULL
);
CREATE INDEX email_signups_token ON email_signups (token);
CREATE UNIQUE INDEX email_signups_token_requests_email ON email_signups (email);

View File

@ -0,0 +1 @@
DROP TABLE email_signups;

View File

@ -0,0 +1,9 @@
CREATE TABLE email_signups (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
email VARCHAR NOT NULL,
token VARCHAR NOT NULL,
expiration_date TIMESTAMP NOT NULL
);
CREATE INDEX email_signups_token ON email_signups (token);
CREATE UNIQUE INDEX email_signups_token_requests_email ON email_signups (email);