fix cmdline flags, fix initdb script

* Actually parse the command line flags.
* Remove CASCADE from drop table.
This commit is contained in:
zegkljan 2022-01-28 00:37:22 +01:00
parent 38318ca654
commit 862350b875
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -36,3 +36,4 @@ go.work
# Project-specific
oko-server
*.sqlite*

View File

@ -16,6 +16,8 @@ func main() {
tilepackFileArg := flag.String("tilepack", "", "File that will be sent to clients when they request a tile pack. Required.")
apkFileArg := flag.String("apk", "", "APK file with the client app. If not specified, no APK will be available (404).")
flag.Parse()
s := server.New(*dbFileArg, *tilepackFileArg, *apkFileArg)
sigs := make(chan os.Signal, 1)

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS users;
CREATE TABLE IF NOT EXISTS users (
id integer PRIMARY KEY AUTOINCREMENT,
name text NOT NULL UNIQUE