Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
4ce5a36d
Commit
4ce5a36d
authored
Aug 20, 2015
by
Bobby Rullo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db: initialize bigint, boolean columns
gorp hates nil.
parent
6798adc6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
1 deletion
+7
-1
0002_dex_admin.sql
db/migrations/0002_dex_admin.sql
+2
-0
0003_user_created_at.sql
db/migrations/0003_user_created_at.sql
+2
-0
assets.go
db/migrations/assets.go
+0
-0
testutil.go
functional/repo/testutil.go
+3
-1
No files found.
db/migrations/0002_dex_admin.sql
View file @
4ce5a36d
-- +migrate Up
ALTER
TABLE
client_identity
ADD
COLUMN
"dex_admin"
boolean
;
UPDATE
"client_identity"
SET
"dex_admin"
=
false
;
db/migrations/0003_user_created_at.sql
View file @
4ce5a36d
-- +migrate Up
ALTER
TABLE
authd_user
ADD
COLUMN
"created_at"
bigint
;
UPDATE
authd_user
SET
"created_at"
=
0
;
db/migrations/assets.go
View file @
4ce5a36d
This diff is collapsed.
Click to expand it.
functional/repo/testutil.go
View file @
4ce5a36d
...
...
@@ -22,6 +22,8 @@ func initDB(dsn string) *gorp.DbMap {
panic
(
fmt
.
Sprintf
(
"Unable to drop migration table: %v"
,
err
))
}
db
.
MigrateToLatest
(
c
)
if
_
,
err
=
db
.
MigrateToLatest
(
c
);
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"Unable to migrate: %v"
,
err
))
}
return
c
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment