Fix SQL migrations

This commit is contained in:
Matej Kramny 2016-04-18 01:06:13 +01:00
parent 4dd8335273
commit 3f0d318522
5 changed files with 8 additions and 6 deletions

View File

@ -18,7 +18,7 @@ create table project (
create table project__user (
`project_id` int(11) not null,
`user_id` varchar (255) not null comment "User ID",
`user_id` int (11) not null comment "User ID",
`admin` tinyint (1) not null default 0 comment 'Gives user god-like privileges',
unique key `id` (`project_id`, `user_id`),

View File

@ -6,5 +6,7 @@ alter table project__template add `arguments` text null,
alter table project__inventory add `ssh_key_id` int(11) not null,
add foreign key (`ssh_key_id`) references access_key(`id`);
alter table task__output drop foreign key `task__output_ibfk_1`;
alter table task__output drop index `id`;
alter table task__output add key `task_id` (`task_id`);
alter table task__output add key `task_id` (`task_id`);
alter table task__output add foreign key (`task_id`) references task(`id`) on delete cascade;

View File

@ -41,10 +41,10 @@ func (version *DBVersion) HumanoidVersion() string {
}
func (version *DBVersion) GetPath() string {
return "database/sql_updates/v" + version.VersionString() + ".sql"
return "database/sql_migrations/v" + version.VersionString() + ".sql"
}
func (version *DBVersion) GetErrPath() string {
return "database/sql_updates/v" + version.VersionString() + ".err.sql"
return "database/sql_migrations/v" + version.VersionString() + ".err.sql"
}
func (version *DBVersion) GetSQL(path string) []string {

View File

@ -4,7 +4,7 @@
h4.no-top-margin Events
ul.list-unstyled
li(ng-repeat="event in events")
time(ng-bind="event.created | date:'short'")
strong: time(ng-bind="event.created | date:'short'")
span : 
a(ng-if="event.project_id != null" ui-sref="project.dashboard({ project_id: event.project_id })") {{ event.project_name }}
span(ng-if="event.project_id != null")  

View File

@ -3,7 +3,7 @@
h3.no-top-margin Project activity
ul.list-unstyled
li(ng-repeat="event in events")
time(ng-bind="event.created | date:'short'")
strong: time(ng-bind="event.created | date:'short'")
span : 
span(ng-bind="event.object_name")
span(ng-if="event.object_name.length > 0") -