Update migrations
This commit is contained in:
@@ -29,11 +29,12 @@ create table if not exists roles (
|
||||
);
|
||||
|
||||
create table if not exists permissions (
|
||||
role_id integer unique not null,
|
||||
dash_id integer unique not null,
|
||||
role_id integer not null,
|
||||
dash_id integer not null,
|
||||
active integer not null default 1,
|
||||
date_create TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
id integer primary key autoincrement
|
||||
id integer primary key autoincrement,
|
||||
unique (role_id, dash_id)
|
||||
);
|
||||
|
||||
INSERT INTO schema_version (version) VALUES ('20251130_191100_add_table_dashboards');
|
||||
|
||||
8
migrations/20251203_201300_rename_col_table_role.sql
Normal file
8
migrations/20251203_201300_rename_col_table_role.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
begin;
|
||||
|
||||
alter table users
|
||||
rename column role to role_id;
|
||||
|
||||
INSERT INTO schema_version (version) VALUES ('20251203_201300_rename_col_table_role');
|
||||
|
||||
COMMIT;
|
||||
@@ -0,0 +1,8 @@
|
||||
begin;
|
||||
|
||||
alter table users
|
||||
add column active integer default 1;
|
||||
|
||||
INSERT INTO schema_version (version) VALUES ('20251203_202200_add_col_active_table_users');
|
||||
|
||||
COMMIT;
|
||||
11
migrations/20251203_202900_add_col_order_tables.sql
Normal file
11
migrations/20251203_202900_add_col_order_tables.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
begin;
|
||||
|
||||
alter table roles
|
||||
add column order_no integer;
|
||||
|
||||
alter table permissions
|
||||
add column order_no integer;
|
||||
|
||||
INSERT INTO schema_version (version) VALUES ('20251203_202900_add_col_order_tables');
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user