From 29243a2d25fd52d3d9e34678fdab1a215b54b7a4 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 16 Feb 2024 23:37:11 +0100 Subject: [PATCH] add db init sh --- ruscoapp/sqlite_init.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 ruscoapp/sqlite_init.sh diff --git a/ruscoapp/sqlite_init.sh b/ruscoapp/sqlite_init.sh new file mode 100755 index 0000000..74492e8 --- /dev/null +++ b/ruscoapp/sqlite_init.sh @@ -0,0 +1,6 @@ +#!/bin/bash +sqlite3 ruscodb "create table users (username TEXT, password TEXT);" +sqlite3 ruscodb "insert into users (username, password) VALUES ('gabibbo','test');" +sqlite3 ruscodb "create table ruschi (id INTEGER PRIMARY KEY AUTOINCREMENT, type TEXT, nome TEXT, descrizione VARCHAR, foto TEXT, lat REAL, lng REAL);" +sqlite3 ruscodb "INSERT INTO ruschi (type, nome, descrizione, foto, lat, lng) VALUES ('random_type', 'random_nome', 'random_descrizione', 'random_foto.jpg', RANDOM(), RANDOM());" +