mirror of
https://github.com/openziti/zrok.git
synced 2025-06-20 17:58:50 +02:00
fine, sqlite, fine... (#96)
This commit is contained in:
parent
4e4bd1c876
commit
e8e87ca6ac
@ -1,22 +1,3 @@
|
|||||||
-- +migrate Up
|
-- +migrate Up
|
||||||
|
|
||||||
alter table accounts rename to accounts_old;
|
alter table accounts add column limitless boolean not null default(false);
|
||||||
|
|
||||||
create table accounts (
|
|
||||||
id integer primary key,
|
|
||||||
email string not null unique,
|
|
||||||
password string not null,
|
|
||||||
token string not null unique,
|
|
||||||
limitless boolean not null default(false),
|
|
||||||
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_email check (email <> ''),
|
|
||||||
constraint chk_password check (password <> ''),
|
|
||||||
constraint chk_token check(token <> '')
|
|
||||||
);
|
|
||||||
|
|
||||||
insert into accounts (id, email, password, token, created_at, updated_at)
|
|
||||||
select id, email, password, token, created_at, updated_at from accounts_old;
|
|
||||||
|
|
||||||
drop table accounts_old;
|
|
Loading…
x
Reference in New Issue
Block a user