mirror of
https://github.com/Cernobor/oko-server.git
synced 2025-02-24 08:27:17 +00:00
* X-User-ID header is processed to get user ID. * Time of last request for a user is saved into DB. * Time of last upload and download is stored for a user. * Added DB migration to add columns into users table to store the times and app version. * Backward fix of datatype of the deadline column in features table. * Switched from crawshaw.io/sqlite to zombiezen.com/go/sqlite. * Refactored DB handling. * Used migration routine from zombiezen in favour of manual one. * Runtime DB reinit simply deletes the db file and initializes the db anew. Fix #6
This commit is contained in:
@@ -8,7 +8,7 @@ CREATE TABLE features (
|
||||
id integer PRIMARY KEY AUTOINCREMENT,
|
||||
owner_id integer NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
name text NOT NULL,
|
||||
deadline text,
|
||||
deadline integer,
|
||||
properties text NOT NULL,
|
||||
geom text NOT NULL
|
||||
);
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE users ADD COLUMN app_version text;
|
||||
ALTER TABLE users ADD COLUMN last_seen_time integer;
|
||||
ALTER TABLE users ADD COLUMN last_upload_time integer;
|
||||
ALTER TABLE users ADD COLUMN last_download_time integer;
|
||||
Reference in New Issue
Block a user