2020-04-27 01:04:58 +02:00
|
|
|
USE brigate;
|
2020-04-24 16:44:53 +02:00
|
|
|
|
2020-04-27 00:02:43 +02:00
|
|
|
CREATE TABLE contatti (
|
|
|
|
nome VARCHAR(255) NOT NULL,
|
|
|
|
cognome VARCHAR(255) NOT NULL,
|
|
|
|
servizio_sociale VARCHAR(255),
|
|
|
|
area VARCHAR(255),
|
|
|
|
indirizzo VARCHAR(255) NOT NULL,
|
|
|
|
telefono INT8 PRIMARY KEY,
|
|
|
|
numero INT8 NOT NULL,
|
|
|
|
composizione_nucleo VARCHAR(255) NOT NULL,
|
|
|
|
note_sacchetto VARCHAR(255),
|
|
|
|
ultima_consegna DATE,
|
|
|
|
email VARCHAR(256)
|
|
|
|
);
|
2020-04-24 16:44:53 +02:00
|
|
|
|
2020-04-27 00:02:43 +02:00
|
|
|
CREATE TABLE ordini (
|
|
|
|
telefono INT8 PRIMARY KEY REFERENCES contatti (telefono)
|
|
|
|
);
|
2020-04-28 00:52:12 +02:00
|
|
|
|
|
|
|
CREATE TABLE utenti (
|
|
|
|
nickname VARCHAR(255) NOT NULL,
|
|
|
|
password VARCHAR(255) NOT NULL,
|
|
|
|
ruolo VARCHAR(255)
|
|
|
|
);
|