add db init sh

This commit is contained in:
user 2024-02-16 23:37:11 +01:00
parent 516dd98506
commit 29243a2d25

6
ruscoapp/sqlite_init.sh Executable file
View file

@ -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());"