Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9347082
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
847 B
Subscribers
None
View Options
diff --git a/sql/upgrades/167.sql b/sql/upgrades/167.sql
index 41a2f21b..ae7c03fa 100644
--- a/sql/upgrades/167.sql
+++ b/sql/upgrades/167.sql
@@ -1,11 +1,16 @@
-- SWH DB schema upgrade
-- from_version: 166
-- to_version: 167
-- description: Make origin_visit_status.type not null
insert into dbversion(version, release, description)
values(167, now(), 'Work In Progress');
--- Data migrated, all values populated now
+-- (blocking) Data migrated, all values populated now, so we can add the constraint
+-- alter table origin_visit_status alter column type set not null;
+
+-- (unblocking) functionally equivalent constraint
alter table origin_visit_status
- alter column type set not null;
+ add constraint type_not_null check (type is not null) not valid;
+
+alter table origin_visit_status validate constraint type_not_null;
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jul 4, 4:56 PM (3 w, 10 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3245897
Attached To
rDSTO Storage manager
Event Timeline
Log In to Comment