enum
This commit is contained in:
@@ -5,9 +5,11 @@ set search_path TO bank;
|
||||
/*
|
||||
* Holder : table commune à tous les titulaires
|
||||
*/
|
||||
create type holder_type as enum ('PERSON', 'COMPANY');
|
||||
|
||||
create table holder (
|
||||
"id" bigint primary key generated always as identity, -- identifiant unique
|
||||
"type" text not null check ("type" in ('PERSON', 'COMPANY')),
|
||||
"type" holder_type not null,
|
||||
"created_at" timestamp not null default now() -- date de création
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user