Browse Source

Adding database fields Date and Time in create tables queries.

master
GabrielTrettel 4 years ago
parent
commit
d583e0f5f8
  1. 23
      src/app/database/db.js

23
src/app/database/db.js

@ -1,37 +1,44 @@
// FIXME: Refactor to our database ERM already combined // FIXME: Refactor to our database ERM already combined
const init_queries = [ const init_queries = [
`CREATE TABLE IF NOT EXISTS FloodZones (
`CREATE TABLE IF NOT EXISTS FloodZones (
Id integer PRIMARY KEY autoincrement, Id integer PRIMARY KEY autoincrement,
Description text, Description text,
Images text, Images text,
Latitude real NOT NULL, Latitude real NOT NULL,
Longitude real NOT NULL, Longitude real NOT NULL,
Passable INTERGER NOT NULL
Passable INTERGER NOT NULL,
Date text,
Time text
);`, );`,
`CREATE TABLE IF NOT EXISTS Pluviometer (
`CREATE TABLE IF NOT EXISTS Pluviometer (
Id integer PRIMARY KEY autoincrement, Id integer PRIMARY KEY autoincrement,
Date text NOT NULL, Date text NOT NULL,
Images text, Images text,
Latitude real NOT NULL, Latitude real NOT NULL,
Longitude real NOT NULL, Longitude real NOT NULL,
Precipitation real NOT NULL
Precipitation real NOT NULL,
Time text
);`, );`,
`CREATE TABLE IF NOT EXISTS RainLevel (
`CREATE TABLE IF NOT EXISTS RainLevel (
Id integer PRIMARY KEY autoincrement, Id integer PRIMARY KEY autoincrement,
Description text, Description text,
RainIdx INTEGER NOT NULL, RainIdx INTEGER NOT NULL,
Images text, Images text,
Latitude real NOT NULL, Latitude real NOT NULL,
Longitude real NOT NULL
Longitude real NOT NULL,
Date text,
Time text
);`, );`,
`CREATE TABLE IF NOT EXISTS RiverLevel (
`CREATE TABLE IF NOT EXISTS RiverLevel (
Id integer PRIMARY KEY autoincrement, Id integer PRIMARY KEY autoincrement,
Description text, Description text,
RiverIdx INTEGER NOT NULL, RiverIdx INTEGER NOT NULL,
Images text, Images text,
Latitude real NOT NULL, Latitude real NOT NULL,
Longitude real NOT NULL
Longitude real NOT NULL,
Date text,
Time text
);`, );`,
]; ];

Loading…
Cancel
Save