Advertisement
dimon-torchila

Untitled

May 9th, 2023
1,182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DROP SCHEMA IF EXISTS hello_schema CASCADE;
  2.  
  3. CREATE SCHEMA IF NOT EXISTS hello_schema;
  4.  
  5. CREATE TABLE IF NOT EXISTS hello_schema.couriers(
  6.     courier_id SERIAL PRIMARY KEY,
  7.     courier_type TEXT,
  8.     regions INTEGER[],
  9.     working_hours TEXT[][]
  10. );
  11.  
  12. CREATE TABLE IF NOT EXISTS hello_schema.users (
  13.     name TEXT PRIMARY KEY,
  14.     count INTEGER DEFAULT(1)
  15. );
  16.  
  17.  
  18.  
  19. CREATE TABLE IF NOT EXISTS hello_schema.orders(
  20.     order_id SERIAL PRIMARY KEY,
  21.     region INTEGER,
  22.     weight FLOAT,
  23.     price INTEGER,
  24.     delivery_time TEXT[]
  25. )
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement