| | |
| | | ----------------------------------------------------------------------------------------------------- 29.下载日志表 |
| | | -- drop table if exists lf.sys_downlog; |
| | | create table lf.sys_downlog ( |
| | | id serial8, |
| | | id serial primary key, |
| | | downid integer default 0, |
| | | name varchar(50), |
| | | type smallint default 1, |
| | |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | | update_time timestamp(6) without time zone |
| | | ) partition by range(create_time); |
| | | create table lf.sys_downlog_2022 partition of lf.sys_downlog for values from ('2022-01-01') to ('2023-01-01'); |
| | | create index index_sys_downlog_2022_create_time on lf.sys_downlog_2022 (create_time); |
| | | create table lf.sys_downlog_2023 partition of lf.sys_downlog for values from ('2023-01-01') to ('2024-01-01'); |
| | | create index index_sys_downlog_2023_create_time on lf.sys_downlog_2023 (create_time); |
| | | create table lf.sys_downlog_2024 partition of lf.sys_downlog for values from ('2024-01-01') to ('2025-01-01'); |
| | | create index index_sys_downlog_2024_create_time on lf.sys_downlog_2024 (create_time); |
| | | create table lf.sys_downlog_2025 partition of lf.sys_downlog for values from ('2025-01-01') to ('2026-01-01'); |
| | | create index index_sys_downlog_2025_create_time on lf.sys_downlog_2025 (create_time); |
| | | create table lf.sys_downlog_2026 partition of lf.sys_downlog for values from ('2026-01-01') to ('2027-01-01'); |
| | | create index index_sys_downlog_2026_create_time on lf.sys_downlog_2026 (create_time); |
| | | create table lf.sys_downlog_2027 partition of lf.sys_downlog for values from ('2027-01-01') to ('2028-01-01'); |
| | | create index index_sys_downlog_2027_create_time on lf.sys_downlog_2027 (create_time); |
| | | |
| | | ); |
| | | comment on table lf.sys_downlog is '下载日志表'; |
| | | comment on column lf.sys_downlog.id is '主键id'; |
| | | comment on column lf.sys_downlog.name is '名称'; |