Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdn-origin
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Show more breadcrumbs
easrng
cdn-origin
Commits
57e3eec0
Commit
57e3eec0
authored
7 years ago
by
Dean
Browse files
Options
Downloads
Patches
Plain Diff
correct schema file for renamed dest_url column
parent
72fca36c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
objects.sql
+4
-4
4 additions, 4 deletions
objects.sql
with
4 additions
and
4 deletions
objects.sql
+
4
−
4
View file @
57e3eec0
...
...
@@ -4,14 +4,14 @@ CREATE TABLE IF NOT EXISTS objects (
bucket
VARCHAR
(
20
)
NOT
NULL
,
-- uint64 bucket ID ("public" for public bucket)
"key"
VARCHAR
(
1024
)
NOT
NULL
,
-- Full bucket path to file (including directory)
dir
VARCHAR
(
1024
)
NOT
NULL
,
-- Directory of file (with trailing slash)
"type"
integer
NOT
NULL
DEFAULT
0
,
-- Object type enumerable (0 = file, 1 =
short_url
)
"type"
integer
NOT
NULL
DEFAULT
0
,
-- Object type enumerable (0 = file, 1 =
redirect
)
backend_file_id
VARCHAR
(
33
)
DEFAULT
NULL
,
-- SeaweedFS file ID (only when object.type == 0)
long
_url
VARCHAR
(
1024
)
DEFAULT
NULL
,
--
L
on
g
URL (only when object.type == 1)
dest
_url
VARCHAR
(
1024
)
DEFAULT
NULL
,
--
Destinati
on URL
for redirect object
(only when object.type == 1)
content_type
VARCHAR
(
255
)
DEFAULT
'application/octet-stream'
,
-- Content-Type of file
content_length
INT
DEFAULT
NULL
,
-- Content-Length of file
auth_hash
VARCHAR
(
64
)
DEFAULT
NULL
,
-- Authentication hash: sha256(user.id + password + object.id)
created_at
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
-- File creation timestamp
md5_hash
VARCHAR
(
32
)
DEFAULT
NULL
-- MD5 hash of file contents (or
l
on
g
URL)
md5_hash
VARCHAR
(
32
)
DEFAULT
NULL
-- MD5 hash of file contents (or
destinati
on URL)
);
-- Test file object: /index.md
...
...
@@ -28,7 +28,7 @@ INSERT INTO objects (bucket_key, bucket, key, dir, type, backend_file_id, conten
);
-- Test short_url object: /short_link
INSERT
INTO
objects
(
bucket_key
,
bucket
,
key
,
dir
,
type
,
long
_url
,
content_type
)
VALUES
(
INSERT
INTO
objects
(
bucket_key
,
bucket
,
key
,
dir
,
type
,
dest
_url
,
content_type
)
VALUES
(
'public/short_path'
,
'public'
,
'/short_path'
,
...
...
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