summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-12 19:27:56 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-12 19:27:56 +0100
commita0b3e5f8b5faf110f3ca9534a2e552896ce58297 (patch)
tree2c7b6b01e6206e2b86907feb4ba76c52b55e785f
parent0be32c2fc914e4e2519947837eddeaaa37cb52f1 (diff)
chapter5: use uuid instead of serial
-rw-r--r--chapters/physic.tex6
1 files changed, 3 insertions, 3 deletions
diff --git a/chapters/physic.tex b/chapters/physic.tex
index 1e923a9..2521f4d 100644
--- a/chapters/physic.tex
+++ b/chapters/physic.tex
@@ -1,7 +1,7 @@
Qui di seguito รจ riportato il \verb|dump| in SQL per la creazione delle tabelle all'interno di PostgreSQL
\begin{lstlisting}[language=SQL]
CREATE TABLE "repository" (
- id serial PRIMARY KEY NOT NULL,
+ id uuid PRIMARY KEY NOT NULL,
url varchar(255) UNIQUE NOT NULL,
created_date timestamp NOT NULL,
updated_date timestamp NOT NULL,
@@ -26,9 +26,9 @@ CREATE TABLE "commit" (
);
CREATE TABLE "branch" (
- id serial PRIMARY KEY NOT NULL,
+ id uuid PRIMARY KEY NOT NULL,
name varchar(120) NOT NULL,
- repository_id integer REFERENCES repository(id) NOT NULL,
+ repository_id uuid REFERENCES repository(id) NOT NULL,
head varchar(40) REFERENCES commit(hash) NULL
);
\end{lstlisting} \ No newline at end of file