Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cf-online-api
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
Container registry
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
Show more breadcrumbs
KS Pardubický kraj
cf-online-api
Commits
ce9e3b72
Verified
Commit
ce9e3b72
authored
4 years ago
by
Andrej Ramašeuski
Browse files
Options
Downloads
Patches
Plain Diff
Migrace do samostatnych adresaru
parent
f4501c6a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sql/1/up.sql
+1
-1
1 addition, 1 deletion
sql/1/up.sql
sql/2/up.sql
+33
-0
33 additions, 0 deletions
sql/2/up.sql
with
34 additions
and
1 deletion
sql/
migrations
.sql
→
sql/
1/up
.sql
+
1
−
1
View file @
ce9e3b72
-- 1 up
create
sequence
"uid_seq"
start
100000
;
create
table
"program"
(
...
...
@@ -17,6 +16,7 @@ create table "program" (
create
table
"users"
(
"id"
integer
not
null
default
nextval
(
'uid_seq'
),
"uuid"
varchar
(
36
)
not
null
,
"is_active"
bool
not
null
default
'true'
,
"username"
text
,
"name"
text
,
"main_group_name"
text
,
...
...
This diff is collapsed.
Click to expand it.
sql/2/up.sql
0 → 100644
+
33
−
0
View file @
ce9e3b72
create
table
"posts"
(
"id"
integer
not
null
default
nextval
(
'uid_seq'
),
"datetime"
timestamp
(
0
)
not
null
default
now
(),
"is_archived"
bool
not
null
default
'false'
,
"user_id"
integer
not
null
,
"type"
integer
not
null
,
-- 0 - "post" | "procedure-proposal"
"state"
integer
not
null
default
0
,
"content"
text
,
"ranking_likes"
integer
not
null
default
0
,
"ranking_dislikes"
integer
not
null
default
0
,
primary
key
(
"id"
)
);
create
table
"announcements"
(
"id"
integer
not
null
default
nextval
(
'uid_seq'
),
"datetime"
timestamp
(
0
)
not
null
default
now
(),
"is_archived"
bool
not
null
default
'false'
,
"user_id"
integer
,
"type"
integer
not
null
,
"content"
text
,
"link"
text
,
"related_post_id"
integer
,
primary
key
(
"id"
)
);
create
view
"posts_view"
as
select
"posts"
.
*
,
"users"
.
"name"
as
"user_name"
,
"users"
.
"main_group_name"
as
"group_name"
from
posts
join
"users"
on
(
"posts"
.
"user_id"
=
"users"
.
"id"
)
;
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