| | |
| | | create table lf.sys_login_2022 partition of lf.sys_login for values from ('2022-01-01') to ('2023-01-01'); |
| | | create INDEX index_sys_login_2022_optime on lf.sys_login_2022 (optime); |
| | | create table lf.sys_login_2023 partition of lf.sys_login for values from ('2023-01-01') to ('2024-01-01'); |
| | | create INDEX index_sys_login_2023_optime on lf.sys_login_2022 (optime); |
| | | create INDEX index_sys_login_2023_optime on lf.sys_login_2023 (optime); |
| | | create table lf.sys_login_2024 partition of lf.sys_login for values from ('2024-01-01') to ('2025-01-01'); |
| | | create INDEX index_sys_login_2024_optime on lf.sys_login_2022 (optime); |
| | | create INDEX index_sys_login_2024_optime on lf.sys_login_2024 (optime); |
| | | create table lf.sys_login_2025 partition of lf.sys_login for values from ('2025-01-01') to ('2026-01-01'); |
| | | create INDEX index_sys_login_2025_optime on lf.sys_login_2022 (optime); |
| | | create INDEX index_sys_login_2025_optime on lf.sys_login_2025 (optime); |
| | | create table lf.sys_login_2026 partition of lf.sys_login for values from ('2026-01-01') to ('2027-01-01'); |
| | | create INDEX index_sys_login_2026_optime on lf.sys_login_2022 (optime); |
| | | create INDEX index_sys_login_2026_optime on lf.sys_login_2026 (optime); |
| | | create table lf.sys_login_2027 partition of lf.sys_login for values from ('2027-01-01') to ('2028-01-01'); |
| | | create INDEX index_sys_login_2027_optime on lf.sys_login_2022 (optime); |
| | | create INDEX index_sys_login_2027_optime on lf.sys_login_2027 (optime); |
| | | |
| | | comment on table lf.sys_login is 'ç»å½æ¥å¿è¡¨'; |
| | | comment on column lf.sys_login.id is '主é®ID'; |
| | |
| | | create table lf.sys_operate_2022 partition of lf.sys_operate for values from ('2022-01-01') to ('2023-01-01'); |
| | | create INDEX index_sys_operate_2022_optime on lf.sys_operate_2022 (optime); |
| | | create table lf.sys_operate_2023 partition of lf.sys_operate for values from ('2023-01-01') to ('2024-01-01'); |
| | | create INDEX index_sys_operate_2023_optime on lf.sys_operate_2022 (optime); |
| | | create INDEX index_sys_operate_2023_optime on lf.sys_operate_2023 (optime); |
| | | create table lf.sys_operate_2024 partition of lf.sys_operate for values from ('2024-01-01') to ('2025-01-01'); |
| | | create INDEX index_sys_operate_2024_optime on lf.sys_operate_2022 (optime); |
| | | create INDEX index_sys_operate_2024_optime on lf.sys_operate_2024 (optime); |
| | | create table lf.sys_operate_2025 partition of lf.sys_operate for values from ('2025-01-01') to ('2026-01-01'); |
| | | create INDEX index_sys_operate_2025_optime on lf.sys_operate_2022 (optime); |
| | | create INDEX index_sys_operate_2025_optime on lf.sys_operate_2025 (optime); |
| | | create table lf.sys_operate_2026 partition of lf.sys_operate for values from ('2026-01-01') to ('2027-01-01'); |
| | | create INDEX index_sys_operate_2026_optime on lf.sys_operate_2022 (optime); |
| | | create INDEX index_sys_operate_2026_optime on lf.sys_operate_2026 (optime); |
| | | create table lf.sys_operate_2027 partition of lf.sys_operate for values from ('2027-01-01') to ('2028-01-01'); |
| | | create INDEX index_sys_operate_2027_optime on lf.sys_operate_2022 (optime); |
| | | create INDEX index_sys_operate_2027_optime on lf.sys_operate_2027 (optime); |
| | | |
| | | comment on table lf.sys_operate is 'æä½æ¥å¿è¡¨'; |
| | | comment on column lf.sys_operate.id is '主é®ID'; |
| | |
| | | create table lf.sys_token_2022 partition of lf.sys_token for values from ('2022-01-01') to ('2023-01-01'); |
| | | create INDEX index_sys_token_2022_create_time on lf.sys_token_2022 (create_time); |
| | | create table lf.sys_token_2023 partition of lf.sys_token for values from ('2023-01-01') to ('2024-01-01'); |
| | | create INDEX index_sys_token_2023_create_time on lf.sys_token_2022 (create_time); |
| | | create INDEX index_sys_token_2023_create_time on lf.sys_token_2023 (create_time); |
| | | create table lf.sys_token_2024 partition of lf.sys_token for values from ('2024-01-01') to ('2025-01-01'); |
| | | create INDEX index_sys_token_2024_create_time on lf.sys_token_2022 (create_time); |
| | | create INDEX index_sys_token_2024_create_time on lf.sys_token_2024 (create_time); |
| | | create table lf.sys_token_2025 partition of lf.sys_token for values from ('2025-01-01') to ('2026-01-01'); |
| | | create INDEX index_sys_token_2025_create_time on lf.sys_token_2022 (create_time); |
| | | create INDEX index_sys_token_2025_create_time on lf.sys_token_2025 (create_time); |
| | | create table lf.sys_token_2026 partition of lf.sys_token for values from ('2026-01-01') to ('2027-01-01'); |
| | | create INDEX index_sys_token_2026_create_time on lf.sys_token_2022 (create_time); |
| | | create INDEX index_sys_token_2026_create_time on lf.sys_token_2026 (create_time); |
| | | create table lf.sys_token_2027 partition of lf.sys_token for values from ('2027-01-01') to ('2028-01-01'); |
| | | create INDEX index_sys_token_2027_create_time on lf.sys_token_2022 (create_time); |
| | | create INDEX index_sys_token_2027_create_time on lf.sys_token_2027 (create_time); |
| | | |
| | | comment on table lf.sys_token is '令ç表'; |
| | | comment on column lf.sys_token.id is '主é®ID'; |
| | |
| | | create table lf.sys_res_op_2022 partition of lf.sys_res_op for values from ('2022-01-01') to ('2023-01-01'); |
| | | create INDEX index_sys_res_op_2022_optime on lf.sys_res_op_2022 (optime); |
| | | create table lf.sys_res_op_2023 partition of lf.sys_res_op for values from ('2023-01-01') to ('2024-01-01'); |
| | | create INDEX index_sys_res_op_2023_optime on lf.sys_res_op_2022 (optime); |
| | | create INDEX index_sys_res_op_2023_optime on lf.sys_res_op_2023 (optime); |
| | | create table lf.sys_res_op_2024 partition of lf.sys_res_op for values from ('2024-01-01') to ('2025-01-01'); |
| | | create INDEX index_sys_res_op_2024_optime on lf.sys_res_op_2022 (optime); |
| | | create INDEX index_sys_res_op_2024_optime on lf.sys_res_op_2024 (optime); |
| | | create table lf.sys_res_op_2025 partition of lf.sys_res_op for values from ('2025-01-01') to ('2026-01-01'); |
| | | create INDEX index_sys_res_op_2025_optime on lf.sys_res_op_2022 (optime); |
| | | create INDEX index_sys_res_op_2025_optime on lf.sys_res_op_2025 (optime); |
| | | create table lf.sys_res_op_2026 partition of lf.sys_res_op for values from ('2026-01-01') to ('2027-01-01'); |
| | | create INDEX index_sys_res_op_2026_optime on lf.sys_res_op_2022 (optime); |
| | | create INDEX index_sys_res_op_2026_optime on lf.sys_res_op_2026 (optime); |
| | | create table lf.sys_res_op_2027 partition of lf.sys_res_op for values from ('2027-01-01') to ('2028-01-01'); |
| | | create INDEX index_sys_res_op_2027_optime on lf.sys_res_op_2022 (optime); |
| | | create INDEX index_sys_res_op_2027_optime on lf.sys_res_op_2027 (optime); |
| | | |
| | | comment on table lf.sys_res_op is 'èµæºæä½è¡¨'; |
| | | comment on column lf.sys_res_op.id is '主é®ID'; |
| | |
| | | comment on column lf.sys_domain.bak is '夿³¨'; |
| | | |
| | | select * from lf.sys_domain order by dom_name,orderid; |
| | | ----------------------------------------------------------------------------------------------------- 27.项ç®è¡¨ |
| | | ----------------------------------------------------------------------------------------------------- 28.项ç®è¡¨ |
| | | -- drop table if exists lf.sys_project; |
| | | create table if not exists lf.sys_project ( |
| | | id serial primary key, |
| | |
| | | comment on column lf.sys_project.geom is '空é´ä½ç½®'; |
| | | |
| | | select * from lf.sys_project; |
| | | ----------------------------------------------------------------------------------------------------- 29.ä¸è½½æ¥å¿è¡¨ |
| | | -- drop table if exists lf.sys_downlog; |
| | | create table lf.sys_downlog ( |
| | | id serial8, |
| | | downid integer default 0, |
| | | name varchar(50), |
| | | type smallint default 1, |
| | | sizes float8 default 0, |
| | | ip varchar(30), |
| | | create_user integer 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 'åç§°'; |
| | | comment on column lf.sys_downlog.type is 'ç±»åï¼1-Shpæä»¶ï¼2-ä¸é¢å¾ï¼3-å
æ°æ®'; |
| | | comment on column lf.sys_downlog.sizes is 'æä»¶å¤§å°ï¼åä½MB'; |
| | | comment on column lf.sys_downlog.ip is 'IPå°å'; |
| | | comment on column lf.sys_downlog.create_user is 'å建人id'; |
| | | comment on column lf.sys_downlog.create_time is 'å建æ¶é´'; |
| | | comment on column lf.sys_downlog.update_user is 'æ´æ°äººid'; |
| | | comment on column lf.sys_downlog.update_time is 'æ´æ°æ¶é´'; |
| | | -- insert into lf.sys_downlog(downid,name,type,sizes,ip,create_user) values (1,'test.zip',1,0.001,'192.168.20.39',1); |
| | | |
| | | select * from lf.sys_downlog; |
| | | ----------------------------------------------------------------------------------------------------- å
æ°æ®æµè¯è¡¨ * |
| | | -- drop table if exists md.md_zxcg; |
| | | create table md.md_zxcg( |