10 lines
266 B
MySQL
10 lines
266 B
MySQL
|
CREATE TABLE users (
|
||
|
id BIGSERIAL PRIMARY KEY,
|
||
|
account_id BIGINT REFERENCES accounts (id),
|
||
|
email VARCHAR NOT NULL,
|
||
|
password VARCHAR NOT NULL,
|
||
|
activated BOOLEAN NOT NULL DEFAULT FALSE
|
||
|
);
|
||
|
|
||
|
CREATE UNIQUE INDEX index_users_on_email ON users (email);
|