2022-07-22 19:53:39 +02:00
|
|
|
-- +migrate Up
|
|
|
|
|
|
|
|
--
|
2022-07-25 22:03:51 +02:00
|
|
|
-- accounts
|
2022-07-22 19:53:39 +02:00
|
|
|
--
|
2022-07-25 22:03:51 +02:00
|
|
|
create table accounts (
|
2022-07-22 19:53:39 +02:00
|
|
|
id integer primary key,
|
2022-07-25 22:03:51 +02:00
|
|
|
username string not null unique,
|
2022-07-22 19:53:39 +02:00
|
|
|
password string not null,
|
2022-07-25 22:03:51 +02:00
|
|
|
token string not null unique,
|
2022-07-22 19:53:39 +02:00
|
|
|
created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
|
|
|
updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
|
|
|
|
|
|
|
constraint chk_username check (username <> ''),
|
|
|
|
constraint chk_password check (username <> ''),
|
|
|
|
constraint chk_token check(token <> '')
|
|
|
|
);
|