Titulaires
This commit is contained in:
@@ -30,10 +30,10 @@ Création de la table `person`.
|
||||
|
||||
```sql
|
||||
create table person (
|
||||
"id" bigint primary key references holder(id),
|
||||
"firstname" text,
|
||||
"lastname" text,
|
||||
"birthdate" date
|
||||
"id" bigint primary key references holder(id) on delete cascade,
|
||||
"firstname" text not null,
|
||||
"lastname" text not null,
|
||||
"birthdate" date not null check (birthdate <= current_date - interval '15 years')
|
||||
);
|
||||
```
|
||||
|
||||
@@ -41,9 +41,10 @@ create table person (
|
||||
|
||||
```sql
|
||||
create table company (
|
||||
"id" bigint primary key references holder(id),
|
||||
"name" text,
|
||||
"creation_date" date
|
||||
"id" bigint primary key references holder(id) on delete cascade,
|
||||
"name" text not null,
|
||||
"registration_number" text unique not null,
|
||||
"creation_date" date not null
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user