mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 23:39:56 +01:00
Fix SQL migrations
This commit is contained in:
parent
4dd8335273
commit
3f0d318522
@ -18,7 +18,7 @@ create table project (
|
|||||||
|
|
||||||
create table project__user (
|
create table project__user (
|
||||||
`project_id` int(11) not null,
|
`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',
|
`admin` tinyint (1) not null default 0 comment 'Gives user god-like privileges',
|
||||||
|
|
||||||
unique key `id` (`project_id`, `user_id`),
|
unique key `id` (`project_id`, `user_id`),
|
||||||
|
@ -6,5 +6,7 @@ alter table project__template add `arguments` text null,
|
|||||||
alter table project__inventory add `ssh_key_id` int(11) not null,
|
alter table project__inventory add `ssh_key_id` int(11) not null,
|
||||||
add foreign key (`ssh_key_id`) references access_key(`id`);
|
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 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;
|
@ -41,10 +41,10 @@ func (version *DBVersion) HumanoidVersion() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (version *DBVersion) GetPath() 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 {
|
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 {
|
func (version *DBVersion) GetSQL(path string) []string {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
h4.no-top-margin Events
|
h4.no-top-margin Events
|
||||||
ul.list-unstyled
|
ul.list-unstyled
|
||||||
li(ng-repeat="event in events")
|
li(ng-repeat="event in events")
|
||||||
time(ng-bind="event.created | date:'short'")
|
strong: time(ng-bind="event.created | date:'short'")
|
||||||
span :
|
span :
|
||||||
a(ng-if="event.project_id != null" ui-sref="project.dashboard({ project_id: event.project_id })") {{ event.project_name }}
|
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")
|
span(ng-if="event.project_id != null")
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
h3.no-top-margin Project activity
|
h3.no-top-margin Project activity
|
||||||
ul.list-unstyled
|
ul.list-unstyled
|
||||||
li(ng-repeat="event in events")
|
li(ng-repeat="event in events")
|
||||||
time(ng-bind="event.created | date:'short'")
|
strong: time(ng-bind="event.created | date:'short'")
|
||||||
span :
|
span :
|
||||||
span(ng-bind="event.object_name")
|
span(ng-bind="event.object_name")
|
||||||
span(ng-if="event.object_name.length > 0") -
|
span(ng-if="event.object_name.length > 0") -
|
||||||
|
Loading…
Reference in New Issue
Block a user