Skip to content

Commit 3f0d318

Browse files
committed
Fix SQL migrations
1 parent 4dd8335 commit 3f0d318

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

database/sql_migrations/v0.0.0.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ create table project (
1818

1919
create table project__user (
2020
`project_id` int(11) not null,
21-
`user_id` varchar (255) not null comment "User ID",
21+
`user_id` int (11) not null comment "User ID",
2222
`admin` tinyint (1) not null default 0 comment 'Gives user god-like privileges',
2323

2424
unique key `id` (`project_id`, `user_id`),

database/sql_migrations/v1.0.0.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ alter table project__template add `arguments` text null,
66
alter table project__inventory add `ssh_key_id` int(11) not null,
77
add foreign key (`ssh_key_id`) references access_key(`id`);
88

9+
alter table task__output drop foreign key `task__output_ibfk_1`;
910
alter table task__output drop index `id`;
10-
alter table task__output add key `task_id` (`task_id`);
11+
alter table task__output add key `task_id` (`task_id`);
12+
alter table task__output add foreign key (`task_id`) references task(`id`) on delete cascade;

migration/versionHistory.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ func (version *DBVersion) HumanoidVersion() string {
4141
}
4242

4343
func (version *DBVersion) GetPath() string {
44-
return "database/sql_updates/v" + version.VersionString() + ".sql"
44+
return "database/sql_migrations/v" + version.VersionString() + ".sql"
4545
}
4646
func (version *DBVersion) GetErrPath() string {
47-
return "database/sql_updates/v" + version.VersionString() + ".err.sql"
47+
return "database/sql_migrations/v" + version.VersionString() + ".err.sql"
4848
}
4949

5050
func (version *DBVersion) GetSQL(path string) []string {

public/html/dashboard.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
h4.no-top-margin Events
55
ul.list-unstyled
66
li(ng-repeat="event in events")
7-
time(ng-bind="event.created | date:'short'")
7+
strong: time(ng-bind="event.created | date:'short'")
88
span : 
99
a(ng-if="event.project_id != null" ui-sref="project.dashboard({ project_id: event.project_id })") {{ event.project_name }}
1010
span(ng-if="event.project_id != null")  

public/html/projects/dashboard.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
h3.no-top-margin Project activity
44
ul.list-unstyled
55
li(ng-repeat="event in events")
6-
time(ng-bind="event.created | date:'short'")
6+
strong: time(ng-bind="event.created | date:'short'")
77
span : 
88
span(ng-bind="event.object_name")
99
span(ng-if="event.object_name.length > 0") - 

0 commit comments

Comments
 (0)