Browse Source

Organizing files

master
ddangelorb 3 years ago
parent
commit
a7a3547817
  1. 38
      db/0.services.ddl.sql
  2. 2
      db/2.wp6.create_config_tables.sql
  3. 0
      db/wp6.sample.floodzones-river-rain-api.json
  4. 0
      db/wp6.sample.forms-fields-answers.json
  5. 0
      db/wp6.sample.pluviometer-api.json
  6. 0
      db/wp6.sample.pluviometer-forms-api.json
  7. 0
      db/wp6.sample.pluviometer-modal-api.json
  8. 0
      db/wp6.sample.pluviometer-register-api.json

38
db/0.services.ddl.sql

@ -1,44 +1,26 @@
CREATE TABLE IF NOT EXISTS users ( CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
Email VARCHAR(255) UNIQUE NOT NULL,
firstname VARCHAR(100) NOT NULL,
surname VARCHAR(100) NOT NULL,
username VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NULL,
firstname VARCHAR(100) NULL,
surname VARCHAR(100) NULL,
avatar VARCHAR(100) NULL, avatar VARCHAR(100) NULL,
active INT NOT NULL active INT NOT NULL
); );
CREATE TABLE IF NOT EXISTS profiles
CREATE TABLE IF NOT EXISTS roles
( (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL, name VARCHAR(100) NOT NULL,
active INT NOT NULL active INT NOT NULL
); );
CREATE TABLE IF NOT EXISTS usersprofiles
CREATE TABLE IF NOT EXISTS users_roles
( (
id SERIAL PRIMARY KEY,
idusers INT NOT NULL,
idprofiles INT NOT NULL,
active INT NOT NULL,
FOREIGN KEY (idusers) REFERENCES users (id),
FOREIGN KEY (idprofiles) REFERENCES profiles (id)
);
CREATE TABLE IF NOT EXISTS permissions
(
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
active INT NOT NULL
);
CREATE TABLE IF NOT EXISTS profilespermissions
(
id SERIAL PRIMARY KEY,
idprofiles INT NOT NULL,
idpermissions INT NOT NULL,
active INT NOT NULL,
FOREIGN KEY (idprofiles) REFERENCES profiles (id),
FOREIGN KEY (idpermissions) REFERENCES permissions (id)
users_id INT NOT NULL,
roles INT NOT NULL,
FOREIGN KEY (users_id) REFERENCES users (id)
); );
CREATE TABLE IF NOT EXISTS formsorigins CREATE TABLE IF NOT EXISTS formsorigins

2
db/create_config_tables.sql → db/2.wp6.create_config_tables.sql

@ -277,4 +277,4 @@ BEGIN
INSERT INTO formsfields(id, idforms, idfields, active) INSERT INTO formsfields(id, idforms, idfields, active)
VALUES (DEFAULT, idpluvregsform, idfieldsinsname, 1); VALUES (DEFAULT, idpluvregsform, idfieldsinsname, 1);
--End Pluviometer Registration Form --End Pluviometer Registration Form
END $$'
END $$;

0
db/floodzones-river-rain-api.json → db/wp6.sample.floodzones-river-rain-api.json

0
db/forms-fields-answers.json → db/wp6.sample.forms-fields-answers.json

0
db/pluviometer-api.json → db/wp6.sample.pluviometer-api.json

0
db/pluviometer-forms-api.json → db/wp6.sample.pluviometer-forms-api.json

0
db/pluviometer-modal-api.json → db/wp6.sample.pluviometer-modal-api.json

0
db/pluviometer-register-api.json → db/wp6.sample.pluviometer-register-api.json

Loading…
Cancel
Save