Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-archiver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Platform
Development
swh-archiver
Commits
639ccd43
Commit
639ccd43
authored
8 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
Update schema to use enum for archive identifier
parent
b8b1152e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sql/swh-archiver-data.sql
+2
-2
2 additions, 2 deletions
sql/swh-archiver-data.sql
sql/swh-archiver-schema.sql
+6
-4
6 additions, 4 deletions
sql/swh-archiver-schema.sql
with
8 additions
and
6 deletions
sql/swh-archiver-data.sql
+
2
−
2
View file @
639ccd43
INSERT
INTO
archive
(
id
,
url
)
VALUES
(
'
B
anco'
,
'http://banco.softwareheritage.org:5003/'
);
g
INSERT
INTO
archive
(
id
,
url
)
VALUES
(
'
b
anco'
,
'http://banco.softwareheritage.org:5003/'
);
This diff is collapsed.
Click to expand it.
sql/swh-archiver-schema.sql
+
6
−
4
View file @
639ccd43
...
...
@@ -13,7 +13,9 @@ comment on table dbversion is 'Schema update tracking';
INSERT
INTO
dbversion
(
version
,
release
,
description
)
VALUES
(
1
,
now
(),
'Work In Progress'
);
CREATE
DOMAIN
archive_id
AS
TEXT
;
CREATE
TYPE
archive_id
AS
ENUM
(
'banco'
);
CREATE
TABLE
archive
(
id
archive_id
PRIMARY
KEY
,
...
...
@@ -37,10 +39,10 @@ CREATE DOMAIN sha1 AS bytea CHECK (LENGTH(VALUE) = 20);
CREATE
TABLE
content_archive
(
content_id
sha1
,
archive_id
archive_id
REFERENCES
archive
(
id
)
DEFERRABLE
,
archive_id
archive_id
REFERENCES
archive
(
id
),
status
archive_status
,
mtime
timestamptz
,
PRIMARY
KEY
(
content_id
,
archive_id
)
DEFERRABLE
mtime
timestamptz
PRIMARY
KEY
(
content_id
,
archive_id
)
);
comment
on
table
content_archive
is
'Referencing the status and whereabouts of a content'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment