feat(be): add user id for access key

This commit is contained in:
fiftin 2024-07-03 12:10:48 +05:00
parent ebc42a208b
commit 991979041f
No known key found for this signature in database
GPG Key ID: 044381366A5D4731
2 changed files with 3 additions and 1 deletions

View File

@ -43,6 +43,7 @@ type AccessKey struct {
OverrideSecret bool `db:"-" json:"override_secret"` OverrideSecret bool `db:"-" json:"override_secret"`
EnvironmentID *int `db:"environment_id" json:"-"` EnvironmentID *int `db:"environment_id" json:"-"`
UserID *int `db:"user_id" json:"-"`
} }
type LoginPassword struct { type LoginPassword struct {

View File

@ -1 +1,2 @@
alter table `access_key` add `environment_id` int null references project__environment(`id`) on delete set null; alter table `access_key` add `environment_id` int null references project__environment(`id`) on delete cascade;
alter table `access_key` add `user_id` int null references user(`id`) on delete cascade;