Skip to content

Instantly share code, notes, and snippets.

@jdaarevalo
Created January 30, 2021 12:13
Show Gist options
  • Save jdaarevalo/653fde05d060cc02a3a7c7a76a83306f to your computer and use it in GitHub Desktop.
Save jdaarevalo/653fde05d060cc02a3a7c7a76a83306f to your computer and use it in GitHub Desktop.
six-section-fill_tables
-- Filling of order_status
INSERT INTO order_status
select gen_random_uuid ()
, date_sale + random()* (date_sale + '5 days' - date_sale)
, sale_id
, floor(random() * (current_setting('my.status_names')::int) + 1)::int
from sale;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment