Commit 5bc41fe3 authored by Daniele Venzano's avatar Daniele Venzano

Fix table creation order in case database is empty

parent 29c27d43
......@@ -65,7 +65,7 @@ class RoleTable(BaseTable):
can_operate_others BOOLEAN NOT NULL DEFAULT FALSE,
can_delete_executions BOOLEAN NOT NULL DEFAULT FALSE,
can_access_api BOOLEAN NOT NULL DEFAULT FALSE,
can_customize_resource BOOLEAN NOT NULL DEFAULT FALSE
can_customize_resources BOOLEAN NOT NULL DEFAULT FALSE
)''')
self.cursor.execute('''INSERT INTO role (id, name, can_see_status, can_change_config, can_operate_others, can_delete_executions, can_access_api, can_customize_resources) VALUES (DEFAULT, 'admin', TRUE, TRUE, TRUE, TRUE, TRUE, TRUE)''')
self.cursor.execute('''INSERT INTO role (id, name, can_see_status, can_access_api, can_customize_resources) VALUES (DEFAULT, 'superuser', TRUE, TRUE, TRUE)''')
......
......@@ -102,12 +102,12 @@ class SQLManager:
return UserTable(self)
def _create_tables(self):
self.executions.create()
self.services.create()
self.ports.create()
self.quota.create()
self.role.create()
self.user.create()
self.executions.create()
self.services.create()
self.ports.create()
def init_db(self, force=False):
"""DB init entrypoint."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment