-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Thomas <31189692+ecktoteckto@users.noreply.github.com>
- Loading branch information
1 parent
8250767
commit e242a8f
Showing
9 changed files
with
266 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
create type orb.plan_status as enum('active', 'archived', 'draft'); | ||
|
||
create table if not exists | ||
orb.plans ( | ||
id varchar(255) primary key, | ||
name text, | ||
description text, | ||
maximum_amount text, | ||
minimum_amount text, | ||
created_at timestamp not null, | ||
status orb.plan_status, | ||
maximum jsonb, | ||
minimum jsonb, | ||
discount jsonb, | ||
product jsonb, | ||
version integer, | ||
trial_config jsonb, | ||
plan_phases json, | ||
base_plan jsonb, | ||
base_plan_id text, | ||
external_plan_id text, | ||
currency text, | ||
invoicing_currency text, | ||
net_terms integer, | ||
default_invoice_memo text, | ||
prices json, | ||
metadata jsonb, | ||
updated_at timestamptz default timezone ('utc'::text, now()) not null | ||
); | ||
|
||
|
||
create trigger handle_updated_at before | ||
update on orb.plans for each row | ||
execute function orb.set_updated_at (); | ||
|
||
create index if not exists plans_external_plan_id_idx on orb.plans (external_plan_id); |
Oops, something went wrong.