Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9311804
D3805.id13408.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D3805.id13408.diff
View Options
diff --git a/sql/upgrades/161.sql b/sql/upgrades/161.sql
new file mode 100644
--- /dev/null
+++ b/sql/upgrades/161.sql
@@ -0,0 +1,17 @@
+-- SWH DB schema upgrade
+-- from_version: 160
+-- to_version: 161
+-- description: Make revision.extra_headers not null
+
+-- latest schema version
+insert into dbversion(version, release, description)
+ values(161, now(), 'Work Still In Progress');
+
+
+update revision
+ set extra_headers = ARRAY[][]
+ where extra_headers is null;
+
+
+alter table revision
+ alter column extra_headers set not null;
diff --git a/swh/storage/sql/30-swh-schema.sql b/swh/storage/sql/30-swh-schema.sql
--- a/swh/storage/sql/30-swh-schema.sql
+++ b/swh/storage/sql/30-swh-schema.sql
@@ -17,7 +17,7 @@
-- latest schema version
insert into dbversion(version, release, description)
- values(160, now(), 'Work In Progress');
+ values(161, now(), 'Work In Progress');
-- a SHA1 checksum
create domain sha1 as bytea check (length(value) = 20);
@@ -240,7 +240,7 @@
object_id bigserial,
date_neg_utc_offset boolean,
committer_date_neg_utc_offset boolean,
- extra_headers bytea[][] -- extra headers (used in hash computation)
+ extra_headers bytea[][] not null -- extra headers (used in hash computation)
);
comment on table revision is 'A revision represents the state of a source code tree at a specific point in time';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 2, 10:32 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3224196
Attached To
D3805: pg: Check revision.extra_headers is not null.
Event Timeline
Log In to Comment