This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -22,5 +22,12 @@ function os2forms_digital_post_schema() {
2222 * Enable Beskedfordeler module.
2323 */
2424function os2forms_digital_post_update_9001() {
25- \Drupal::service('module_installer')->install(['beskedfordeler']);
25+ Drupal::service('module_installer')->install(['beskedfordeler']);
26+ }
27+
28+ /**
29+ * Create beskedfordeler table.
30+ */
31+ function os2forms_digital_post_update_9002() {
32+ Drupal::service(BeskedfordelerHelper::class)->update9002();
2633}
Original file line number Diff line number Diff line change @@ -161,4 +161,52 @@ public function schema(): array {
161161 ];
162162 }
163163
164+ /**
165+ * Implements hook_update_N().
166+ *
167+ * Creates beskedfordeler table.
168+ */
169+ public function update9002 () {
170+ $ spec = [
171+ 'description ' => 'OSForms digital post beskedfordeler ' ,
172+ 'fields ' => [
173+ 'submission_id ' => [
174+ 'description ' => 'The submission id. ' ,
175+ 'type ' => 'int ' ,
176+ 'not null ' => TRUE ,
177+ ],
178+ 'message_uuid ' => [
179+ 'description ' => 'The message UUID (formatted with dashes). ' ,
180+ 'type ' => 'varchar ' ,
181+ 'length ' => 36 ,
182+ 'not null ' => TRUE ,
183+ ],
184+ 'message ' => [
185+ 'description ' => 'The MeMo message (XML). ' ,
186+ 'type ' => 'text ' ,
187+ 'size ' => 'medium ' ,
188+ 'not null ' => TRUE ,
189+ ],
190+ 'receipt ' => [
191+ 'description ' => 'The MeMo message receipt (XML). ' ,
192+ 'type ' => 'text ' ,
193+ 'size ' => 'medium ' ,
194+ 'not null ' => TRUE ,
195+ ],
196+ 'beskedfordeler_message ' => [
197+ 'description ' => 'The Beskedfordeler message (XML). ' ,
198+ 'type ' => 'text ' ,
199+ 'size ' => 'medium ' ,
200+ 'not null ' => FALSE ,
201+ ],
202+ ],
203+ 'indexes ' => [
204+ 'submission_id ' => ['submission_id ' ],
205+ ],
206+ 'primary key ' => ['message_uuid ' ],
207+ ];
208+
209+ $ this ->database ->schema ()->createTable (self ::TABLE_NAME , $ spec );
210+ }
211+
164212}
You can’t perform that action at this time.
0 commit comments