1- class DRMDBInit < ActiveRecord ::Migration [ 7.2 ]
1+ class DRMDBInit < ActiveRecord ::Migration [ 8.0 ]
22 def change
33 execute 'CREATE SCHEMA mass'
44
@@ -20,6 +20,19 @@ def change
2020 t . bigint :p_acc_id
2121 end
2222
23+ create_table 'mass.batch' , id : false do |t |
24+ t . bigint :bat_id , primary_key : true
25+
26+ t . integer :status , null : false
27+ t . timestamp :updated , null : false , default : -> { "DATE_TRUNC('second', NOW())" }
28+ t . bigint :main_meta_id , null : false
29+ t . bigint :sub_meta_id , null : false
30+ t . bigint :usr_id , null : false
31+ t . integer :serial , null : false
32+ t . text :machine
33+ t . integer :priority , null : false , default : 50
34+ end
35+
2336 create_table 'mass.ext_entity' , id : false do |t |
2437 t . bigint :ext_id , primary_key : true
2538
@@ -87,6 +100,14 @@ def change
87100 t . text :note
88101 end
89102
103+ create_table 'mass.submission_component' , id : false do |t |
104+ t . bigint :det_id , primary_key : true
105+
106+ t . bigint :grp_id , null : false
107+ t . text :field_key , null : false
108+ t . text :field_value , null : false
109+ end
110+
90111 create_table 'mass.submission_group' , id : false do |t |
91112 t . bigint :grp_id , primary_key : true
92113
0 commit comments