mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 23:02:52 +01:00
set migrations table name
This commit is contained in:
parent
e3f4eb33fe
commit
abad64c808
@ -15,3 +15,15 @@ create table accounts (
|
||||
constraint chk_password check (username <> ''),
|
||||
constraint chk_token check(token <> '')
|
||||
);
|
||||
|
||||
--
|
||||
-- services
|
||||
--
|
||||
create table services (
|
||||
id integer primary key,
|
||||
name string not null unique,
|
||||
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_name check (name <> '')
|
||||
);
|
@ -54,6 +54,7 @@ func (self *Store) migrate() error {
|
||||
FileSystem: sql.Fs,
|
||||
Root: "/",
|
||||
}
|
||||
migrate.SetTable("migrations")
|
||||
n, err := migrate.Exec(self.db.DB, "sqlite3", migrations, migrate.Up)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error running migrations")
|
||||
|
Loading…
Reference in New Issue
Block a user