bladex-update-dameng-3.0.0~3.0.1.sql 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. -- -----------------------------------
  2. -- 修改 代码生成表字段类型
  3. -- -----------------------------------
  4. ALTER TABLE "BLADEX"."BLADE_CODE" ALTER COLUMN "DATASOURCE_ID" RENAME TO "MODEL_ID";
  5. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."MODEL_ID" IS '数据模型主键';
  6. -- -----------------------------------
  7. -- 新增 代码生成表字段类型
  8. -- -----------------------------------
  9. ALTER TABLE "BLADEX"."BLADE_CODE" ADD "TEMPLATE_TYPE" VARCHAR(32);
  10. ALTER TABLE "BLADEX"."BLADE_CODE" ADD "AUTHOR" VARCHAR(32);
  11. ALTER TABLE "BLADEX"."BLADE_CODE" ADD "SUB_MODEL_ID" VARCHAR(32);
  12. ALTER TABLE "BLADEX"."BLADE_CODE" ADD "SUB_FK_ID" VARCHAR(32);
  13. ALTER TABLE "BLADEX"."BLADE_CODE" ADD "TREE_ID" VARCHAR(32);
  14. ALTER TABLE "BLADEX"."BLADE_CODE" ADD "TREE_PID" VARCHAR(32);
  15. ALTER TABLE "BLADEX"."BLADE_CODE" ADD "TREE_NAME" VARCHAR(64);
  16. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."TEMPLATE_TYPE" IS '模版类型';
  17. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."AUTHOR" IS '作者信息';
  18. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."SUB_MODEL_ID" IS '子表模型主键';
  19. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."SUB_FK_ID" IS '子表绑定外键';
  20. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."TREE_ID" IS '树主键字段';
  21. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."TREE_PID" IS '树父主键字段';
  22. COMMENT ON COLUMN "BLADEX"."BLADE_CODE"."TREE_NAME" IS '树名称字段';
  23. -- -----------------------------------
  24. -- 新增模型设计菜单
  25. -- -----------------------------------
  26. INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "COMPONENT", "REMARK", "IS_DELETED")
  27. VALUES ('1161272593873321996', '1123598815738675217', 'model', '数据模型设计', 'menu', '/tool/model', 'iconfont icon-biaodan', 3, 1, 0, 1, '', '', 0);
  28. -- -----------------------------------
  29. -- 新增 数据模型表
  30. -- -----------------------------------
  31. CREATE TABLE "BLADEX"."BLADE_MODEL"
  32. (
  33. "ID" BIGINT IDENTITY(1, 1) NOT NULL,
  34. "DATASOURCE_ID" BIGINT,
  35. "MODEL_NAME" VARCHAR(50),
  36. "MODEL_CODE" VARCHAR(50),
  37. "MODEL_TABLE" VARCHAR(100),
  38. "MODEL_CLASS" VARCHAR(100),
  39. "MODEL_REMARK" VARCHAR(500),
  40. "CREATE_USER" BIGINT,
  41. "CREATE_DEPT" BIGINT,
  42. "CREATE_TIME" TIMESTAMP(0),
  43. "UPDATE_USER" BIGINT,
  44. "UPDATE_TIME" TIMESTAMP(0),
  45. "STATUS" INT,
  46. "IS_DELETED" INT,
  47. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;
  48. COMMENT ON TABLE "BLADEX"."BLADE_MODEL" IS '数据模型表';
  49. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."CREATE_DEPT" IS '创建部门';
  50. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."CREATE_TIME" IS '创建时间';
  51. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."CREATE_USER" IS '创建人';
  52. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."DATASOURCE_ID" IS '数据源主键';
  53. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."ID" IS '主键';
  54. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."IS_DELETED" IS '是否已删除';
  55. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."MODEL_CLASS" IS '模型类名';
  56. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."MODEL_CODE" IS '模型编号';
  57. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."MODEL_NAME" IS '模型名称';
  58. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."MODEL_REMARK" IS '模型备注';
  59. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."MODEL_TABLE" IS '物理表名';
  60. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."STATUS" IS '状态';
  61. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."UPDATE_TIME" IS '修改时间';
  62. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL"."UPDATE_USER" IS '修改人';
  63. -- -----------------------------------
  64. -- 新增 数据原型表
  65. -- -----------------------------------
  66. CREATE TABLE "BLADEX"."BLADE_MODEL_PROTOTYPE"
  67. (
  68. "ID" BIGINT IDENTITY(1, 1) NOT NULL,
  69. "MODEL_ID" BIGINT,
  70. "JDBC_NAME" VARCHAR(50),
  71. "JDBC_TYPE" VARCHAR(20),
  72. "COMMENT" VARCHAR(500),
  73. "PROPERTY_TYPE" VARCHAR(20),
  74. "PROPERTY_ENTITY" VARCHAR(500),
  75. "PROPERTY_NAME" VARCHAR(50),
  76. "IS_LIST" INT,
  77. "IS_FORM" INT,
  78. "IS_ROW" INT,
  79. "COMPONENT_TYPE" VARCHAR(50),
  80. "DICT_CODE" VARCHAR(50),
  81. "IS_REQUIRED" INT,
  82. "IS_QUERY" INT,
  83. "QUERY_TYPE" VARCHAR(50),
  84. "CREATE_USER" BIGINT,
  85. "CREATE_DEPT" BIGINT,
  86. "CREATE_TIME" TIMESTAMP(0),
  87. "UPDATE_USER" BIGINT,
  88. "UPDATE_TIME" TIMESTAMP(0),
  89. "STATUS" INT,
  90. "IS_DELETED" INT,
  91. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;
  92. COMMENT ON TABLE "BLADEX"."BLADE_MODEL_PROTOTYPE" IS '数据原型表';
  93. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."COMMENT" IS '注释说明';
  94. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."COMPONENT_TYPE" IS '组件类型';
  95. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."CREATE_DEPT" IS '创建部门';
  96. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."CREATE_TIME" IS '创建时间';
  97. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."CREATE_USER" IS '创建人';
  98. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."DICT_CODE" IS '字典编码';
  99. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."ID" IS '主键';
  100. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."IS_DELETED" IS '是否已删除';
  101. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."IS_FORM" IS '表单显示';
  102. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."IS_LIST" IS '列表显示';
  103. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."IS_QUERY" IS '查询配置';
  104. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."IS_REQUIRED" IS '是否必填';
  105. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."IS_ROW" IS '独占一行';
  106. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."JDBC_NAME" IS '物理列名';
  107. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."JDBC_TYPE" IS '物理类型';
  108. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."MODEL_ID" IS '模型主键';
  109. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."PROPERTY_ENTITY" IS '实体类型引用';
  110. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."PROPERTY_NAME" IS '实体列名';
  111. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."PROPERTY_TYPE" IS '实体类型';
  112. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."QUERY_TYPE" IS '查询类型';
  113. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."STATUS" IS '状态';
  114. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."UPDATE_TIME" IS '修改时间';
  115. COMMENT ON COLUMN "BLADEX"."BLADE_MODEL_PROTOTYPE"."UPDATE_USER" IS '修改人';