13 lines
379 B
SQL
13 lines
379 B
SQL
create sequence products_productid_seq;
|
|
|
|
create table if not exists products
|
|
(
|
|
productid integer not null
|
|
constraint pk_products
|
|
primary key DEFAULT nextval('products_productid_seq'),
|
|
productname text not null,
|
|
created_at timestamp not null default current_timestamp
|
|
);
|
|
|
|
alter sequence products_productid_seq
|
|
owned by products.productid; |