bladex-update-oracle-3.0.0~3.0.1.sql 6.0 KB

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