@@ -20,23 +20,24 @@ drop sequence if exists test_pilot.items_id_seq;
20
20
create sequence test_pilot.items_id_seq as bigint;
21
21
22
22
create table test_pilot.items (
23
- id bigint primary key default nextval('test_pilot.items_id_seq'::regclass),
24
- email text not null,
25
- status text not null,
26
- data jsonb,
27
- created_at timestamptz not null default now(),
28
- amount numeric(12,2) not null default 0,
29
- category integer not null default 0,
23
+ id bigint primary key default nextval('test_pilot.items_id_seq'::regclass),
24
+ email text not null,
25
+ status text not null,
26
+ data jsonb,
27
+ created_at timestamptz not null default now(),
28
+ amount numeric(12,2) not null default 0,
29
+ category integer not null default 0,
30
30
updated_at timestamptz
31
31
);
32
32
33
33
alter sequence test_pilot.items_id_seq owned by test_pilot.items.id;
34
34
35
- create index items_category_idx on test_pilot.items(category);
36
- create index items_status_idx on test_pilot.items(status);
37
- create index items_created_at_idx on test_pilot.items(created_at);
38
- create index items_email_idx on test_pilot.items(email);
39
- create index idx_items_data_gin on test_pilot.items using gin (data);
35
+ create index items_updated_at_idx on test_pilot.items(updated_at);
36
+ create index items_category_idx on test_pilot.items(category);
37
+ create index items_status_idx on test_pilot.items(status);
38
+ create index items_created_at_idx on test_pilot.items(created_at);
39
+ create index items_email_idx on test_pilot.items(email);
40
+ create index idx_items_data_gin on test_pilot.items using gin (data);
40
41
41
42
insert into test_pilot.items (email, status, data, created_at, amount, category, updated_at)
42
43
select
0 commit comments