@@ -282,26 +282,14 @@ create table single_signature (
282
282
"# ,
283
283
) ,
284
284
// Migration 10
285
- // Add the single signatures attached to the open messages. This table
286
- // does not have a previous existence so no data migration is needed.
285
+ // Alter `open_message` table and drop `single_signature_legacy` table
287
286
SqlMigration :: new(
288
287
10 ,
289
288
r#"
290
- create table new_open_message (
291
- open_message_id text not null,
292
- epoch_setting_id int not null,
293
- beacon json not null,
294
- signed_entity_type_id int not null,
295
- protocol_message json not null,
296
- is_certified bool not null default false,
297
- created_at text not null default current_timestamp,
298
- primary key (open_message_id),
299
- foreign key (epoch_setting_id) references epoch_setting (epoch_setting_id),
300
- foreign key (signed_entity_type_id) references signed_entity_type (signed_entity_type_id)
301
- );
302
- alter table open_message rename to old_open_message;
303
- alter table new_open_message rename to open_message;
304
- drop table old_open_message;
289
+ drop table single_signature_legacy;
290
+ alter table open_message drop column message;
291
+ alter table open_message add column protocol_message json not null;
292
+ alter table open_message add column is_certified bool not null default false;
305
293
"# ,
306
294
) ,
307
295
]
0 commit comments