create sequence orders_ordersid_seq;


create table if not exists orders
(
    orderid        integer   not null
        constraint pk_orders
            primary key default nextval('orders_ordersid_seq'),
    customer_email text      not null,
    created_at     timestamp not null default current_timestamp
);

alter sequence orders_ordersid_seq
owned by orders.orderid;