Files
expenses/server/migrations/20261231000000_seed_demo_data.sql
T
2026-10-12 17:11:38 +02:00

134 lines
2.9 KiB
SQL

INSERT INTO
users (id, name)
VALUES (
'00000000-0000-0000-0000-000000000001',
'Rocky'
),
(
'00000000-0000-0000-0000-000000000002',
'Steve'
);
INSERT INTO
user_apps (id, user_id)
VALUES (
'00000000-0000-0000-0001-000000000001',
'00000000-0000-0000-0000-000000000001'
),
(
'00000000-0000-0000-0001-000000000002',
'00000000-0000-0000-0000-000000000002'
);
INSERT INTO
user_app_secrets (
id,
app_id,
secret_hash,
expires_at
)
VALUES (
'00000000-0000-0000-0002-000000000001',
'00000000-0000-0000-0001-000000000001',
sha256 (convert_to ('test', 'UTF8')),
'2030-01-01T00:00:00Z'
),
(
'00000000-0000-0000-0002-000000000002',
'00000000-0000-0000-0001-000000000002',
sha256 (convert_to ('test', 'UTF8')),
'2030-01-01T00:00:00Z'
);
INSERT INTO
accounts (id, name)
VALUES (
'00000000-0000-0000-0003-000000000001',
'Checking Account'
),
(
'00000000-0000-0000-0003-000000000002',
'Savings Account'
);
INSERT INTO
account_members (id, account_id, user_id)
VALUES (
'00000000-0000-0000-0006-000000000001',
'00000000-0000-0000-0003-000000000001',
'00000000-0000-0000-0000-000000000001'
),
(
'00000000-0000-0000-0006-000000000002',
'00000000-0000-0000-0003-000000000001',
'00000000-0000-0000-0000-000000000002'
),
(
'00000000-0000-0000-0006-000000000002',
'00000000-0000-0000-0003-000000000002',
'00000000-0000-0000-0000-000000000002'
);
INSERT INTO
transactions (
id,
account_id,
amount_cents,
direction,
date,
description
)
VALUES (
'00000000-0000-0000-0004-000000000001',
'00000000-0000-0000-0003-000000000001',
320000,
'in',
'2026-09-01T09:00:00Z',
'Salary'
),
(
'00000000-0000-0000-0004-000000000002',
'00000000-0000-0000-0003-000000000002',
8450,
'out',
'2026-09-18T17:30:00Z',
'Groceries'
);
INSERT INTO
recurring_transactions (
id,
name,
account_id,
amount_cents,
direction,
starts_at,
ends_at,
recurrence_every,
recurrence_unit,
weekend_adjustment
)
VALUES (
'00000000-0000-0000-0005-000000000001',
'Salary',
'00000000-0000-0000-0003-000000000001',
320000,
'in',
'2026-10-01T09:00:00Z',
NULL,
1,
'month',
NULL
),
(
'00000000-0000-0000-0005-000000000002',
'Rent',
'00000000-0000-0000-0003-000000000002',
125000,
'out',
'2026-10-01T09:00:00Z',
NULL,
1,
'month',
'previous_business_day'
);