From 3e9ddc0b730c18db67cbb7fdc0870d25dbec2a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Fri, 2 Feb 2024 09:28:45 +0100 Subject: [PATCH] remove table creation from init and only grant access --- .../storage/database/001_init.sql | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tools/walletextension/storage/database/001_init.sql b/tools/walletextension/storage/database/001_init.sql index 126e1a2a55..8dc68bac38 100644 --- a/tools/walletextension/storage/database/001_init.sql +++ b/tools/walletextension/storage/database/001_init.sql @@ -1,22 +1,7 @@ /* - This file is used to initialize the database by the github action manual-deploy-obscuro-gateway-database.yml - - todo (@ziga) : separate the database initialization from the database migration and delete this file and use migration files for each database type instead (sqlite, mariadb, edgelessdb) + This file is used to create database and create the necessary permissions to the user that will be used by the gateway. */ CREATE DATABASE ogdb; - USE ogdb; - GRANT SELECT, INSERT, UPDATE, DELETE ON ogdb.* TO 'obscurouser'; - -CREATE TABLE IF NOT EXISTS ogdb.users ( - user_id varbinary(20) PRIMARY KEY, - private_key varbinary(32) - ); -CREATE TABLE IF NOT EXISTS ogdb.accounts ( - user_id varbinary(20), - account_address varbinary(20), - signature varbinary(65), - FOREIGN KEY(user_id) REFERENCES users(user_id) ON DELETE CASCADE - ); \ No newline at end of file