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 {