Skip to content

Instantly share code, notes, and snippets.

@phyng
Created July 10, 2017 01:21
Show Gist options
  • Select an option

  • Save phyng/472df1cde8bd0a847d5fe51e99933432 to your computer and use it in GitHub Desktop.

Select an option

Save phyng/472df1cde8bd0a847d5fe51e99933432 to your computer and use it in GitHub Desktop.

Revisions

  1. phyng created this gist Jul 10, 2017.
    4 changes: 4 additions & 0 deletions order.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    ALTER TABLE order_orderitem ADD company_id int;
    CREATE INDEX order_orderitem_company_id ON order_orderitem USING btree (company_id);
    ALTER TABLE ONLY order_orderitem
    ADD CONSTRAINT company_id_refs_id_4459ffbd FOREIGN KEY (company_id) REFERENCES company_company(id) DEFERRABLE INITIALLY DEFERRED;