-- Fetch all the Subscriptions belonging to the Seal
-- account of a particular user.
SELECT *
FROM fiber.seal_subscription
WHERE account_id = '{user.seal_id}'
-- Fetch all the Subscriptions belonging to the Seal
-- account of a particular user.
SELECT *
FROM fiber.seal_subscription
WHERE account_id = '{user.seal_id}'
Code
CREATE TABLE fiber.seal_subscription (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
order_placed TEXT,
order_id TEXT,
status TEXT,
internal_id TEXT,
delivery_interval TEXT,
billing_interval TEXT,
email TEXT,
currency TEXT,
first_name TEXT,
last_name TEXT,
s_first_name TEXT,
s_last_name TEXT,
s_address_1 TEXT,
s_address_2 TEXT,
s_phone TEXT,
s_city TEXT,
s_zip TEXT,
s_province TEXT,
s_country TEXT,
s_country_code TEXT,
s_province_code TEXT,
b_first_name TEXT,
b_last_name TEXT,
b_address_1 TEXT,
b_address_2 TEXT,
b_phone TEXT,
b_city TEXT,
b_zip TEXT,
b_province TEXT,
b_country TEXT,
b_company TEXT,
b_country_code TEXT,
b_province_code TEXT,
total_value DOUBLE PRECISION,
admin_note TEXT,
subscription_type DOUBLE PRECISION,
cancellation_reason TEXT,
edit_url TEXT,
items JSONB
)
CREATE TABLE fiber.seal_subscription (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
order_placed TEXT,
order_id TEXT,
status TEXT,
internal_id TEXT,
delivery_interval TEXT,
billing_interval TEXT,
email TEXT,
currency TEXT,
first_name TEXT,
last_name TEXT,
s_first_name TEXT,
s_last_name TEXT,
s_address_1 TEXT,
s_address_2 TEXT,
s_phone TEXT,
s_city TEXT,
s_zip TEXT,
s_province TEXT,
s_country TEXT,
s_country_code TEXT,
s_province_code TEXT,
b_first_name TEXT,
b_last_name TEXT,
b_address_1 TEXT,
b_address_2 TEXT,
b_phone TEXT,
b_city TEXT,
b_zip TEXT,
b_province TEXT,
b_country TEXT,
b_company TEXT,
b_country_code TEXT,
b_province_code TEXT,
total_value DOUBLE PRECISION,
admin_note TEXT,
subscription_type DOUBLE PRECISION,
cancellation_reason TEXT,
edit_url TEXT,
items JSONB
)
Model definition