sql_back.sql 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. -- 建表语句
  2. create table sqmdb_rpt.acl_city
  3. (
  4. city_id serial not null
  5. constraint city_pk
  6. primary key,
  7. city_name_zh varchar,
  8. city_name_en varchar,
  9. ord integer
  10. );
  11. alter table sqmdb_rpt.acl_city
  12. owner to sqmdb;
  13. create table sqmdb_rpt.acl_role
  14. (
  15. role_id serial not null
  16. constraint role_pk
  17. primary key,
  18. role_name varchar,
  19. create_time date,
  20. update_time date
  21. );
  22. alter table sqmdb_rpt.acl_role
  23. owner to sqmdb;
  24. drop table sqmdb_rpt.acl_user;
  25. create table sqmdb_rpt.acl_user
  26. (
  27. user_id serial not null
  28. constraint user_pk
  29. primary key,
  30. login_name varchar,
  31. user_name varchar,
  32. phone varchar,
  33. email varchar,
  34. province varchar,
  35. city varchar,
  36. county varchar,
  37. tsfx_per integer,
  38. tsys_per integer,
  39. tsdp_per integer,
  40. tsgdlz_per integer,
  41. ceate_time date,
  42. update_time date
  43. );
  44. alter table sqmdb_rpt.acl_user
  45. owner to sqmdb;
  46. create table sqmdb_rpt.acl_user_role
  47. (
  48. id serial not null
  49. constraint user_role_pk
  50. primary key,
  51. user_id integer,
  52. role_id integer,
  53. create_time date,
  54. update_time date
  55. );
  56. alter table sqmdb_rpt.acl_user_role
  57. owner to sqmdb;
  58. create table sqmdb_rpt.acl_org
  59. (
  60. org_id serial not null
  61. constraint org_pk
  62. primary key,
  63. org_name varchar,
  64. create_time date,
  65. update_time date
  66. );
  67. alter table sqmdb_rpt.acl_org
  68. owner to sqmdb;