rastrillo / idear Public

Clone
git clone https://amadan.net/rastrillo/idear

Plain git — no account needed to clone.

Download

Download this file

1CREATE TABLE IF NOT EXISTS idear_members (
2 id INTEGER PRIMARY KEY AUTOINCREMENT,
3 subject TEXT,
4 email TEXT,
5 name TEXT,
6 role TEXT NOT NULL,
7 deactivated_at DATETIME,
8 created_at DATETIME,
9 updated_at DATETIME
10);
11
12CREATE UNIQUE INDEX IF NOT EXISTS idx_idear_members_subject ON idear_members (subject);
13CREATE INDEX IF NOT EXISTS idx_idear_members_email ON idear_members (email);
14CREATE INDEX IF NOT EXISTS idx_idear_members_role ON idear_members (role);
15
16CREATE TABLE IF NOT EXISTS idear_invitations (
17 id INTEGER PRIMARY KEY AUTOINCREMENT,
18 email TEXT,
19 role TEXT NOT NULL,
20 token_hash TEXT,
21 invited_by INTEGER,
22 created_at DATETIME,
23 expires_at DATETIME,
24 accepted_at DATETIME,
25 revoked_at DATETIME
26);
27
28CREATE UNIQUE INDEX IF NOT EXISTS idx_idear_invitations_token_hash ON idear_invitations (token_hash);
29CREATE INDEX IF NOT EXISTS idx_idear_invitations_email ON idear_invitations (email);
30