From 90073c80908d0e432b176e4f480fcc23ea634a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Thu, 22 Feb 2024 12:41:49 +0100 Subject: [PATCH] remove unused .sql files --- tools/walletextension/storage/database/sqlite/001_init.sql | 2 -- .../walletextension/storage/database/sqlite/002_users.sql | 5 ----- .../storage/database/sqlite/003_accounts.sql | 7 ------- tools/walletextension/storage/database/sqlite/sqlite.go | 5 +++-- 4 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 tools/walletextension/storage/database/sqlite/001_init.sql delete mode 100644 tools/walletextension/storage/database/sqlite/002_users.sql delete mode 100644 tools/walletextension/storage/database/sqlite/003_accounts.sql diff --git a/tools/walletextension/storage/database/sqlite/001_init.sql b/tools/walletextension/storage/database/sqlite/001_init.sql deleted file mode 100644 index a0456ea7f5..0000000000 --- a/tools/walletextension/storage/database/sqlite/001_init.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Enable foreign keys in SQLite -PRAGMA foreign_keys = ON; \ No newline at end of file diff --git a/tools/walletextension/storage/database/sqlite/002_users.sql b/tools/walletextension/storage/database/sqlite/002_users.sql deleted file mode 100644 index 7155d722f0..0000000000 --- a/tools/walletextension/storage/database/sqlite/002_users.sql +++ /dev/null @@ -1,5 +0,0 @@ --- Create users table -CREATE TABLE IF NOT EXISTS users ( - user_id binary(20) PRIMARY KEY, - private_key binary(32) -); \ No newline at end of file diff --git a/tools/walletextension/storage/database/sqlite/003_accounts.sql b/tools/walletextension/storage/database/sqlite/003_accounts.sql deleted file mode 100644 index 6099ad5017..0000000000 --- a/tools/walletextension/storage/database/sqlite/003_accounts.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Create accounts table -CREATE TABLE IF NOT EXISTS accounts ( - user_id binary(20), - account_address binary(20), - signature binary(65), - FOREIGN KEY(user_id) REFERENCES users(user_id) ON DELETE CASCADE -); \ No newline at end of file diff --git a/tools/walletextension/storage/database/sqlite/sqlite.go b/tools/walletextension/storage/database/sqlite/sqlite.go index e3586239cb..5ef0d92b5f 100644 --- a/tools/walletextension/storage/database/sqlite/sqlite.go +++ b/tools/walletextension/storage/database/sqlite/sqlite.go @@ -3,12 +3,13 @@ package sqlite import ( "database/sql" "fmt" + "os" + "path/filepath" + _ "github.com/mattn/go-sqlite3" // sqlite driver for sql.Open() obscurocommon "github.com/ten-protocol/go-ten/go/common" "github.com/ten-protocol/go-ten/go/common/errutil" common "github.com/ten-protocol/go-ten/tools/walletextension/common" - "os" - "path/filepath" ) type Database struct {