Skip to content

Commit

Permalink
NOISSUE - remove owner id from user table and object (#1303)
Browse files Browse the repository at this point in the history
* remove owner id

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remove owner id

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
  • Loading branch information
mteodor authored Dec 15, 2020
1 parent 9864b27 commit 18dd896
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions users/postgres/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ func migrateDB(db *sqlx.DB) error {
FOREIGN KEY (group_id) REFERENCES groups (id) ON DELETE CASCADE ON UPDATE CASCADE,
PRIMARY KEY (user_id, group_id)
)`,
`ALTER TABLE IF EXISTS users ADD COLUMN IF NOT EXISTS owner_id UUID`,
`ALTER TABLE IF EXISTS users ADD FOREIGN KEY (owner_id) REFERENCES groups(id)`,
},
},
},
Expand Down
1 change: 0 additions & 1 deletion users/postgres/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ func (m dbMetadata) Value() (driver.Value, error) {

type dbUser struct {
ID string `db:"id"`
Owner string `db:"owner"`
Email string `db:"email"`
Password string `db:"password"`
Metadata []byte `db:"metadata"`
Expand Down
3 changes: 0 additions & 3 deletions users/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ type User struct {
ID string
Email string
Password string
OwnerID string
Owner *User
Groups []Group
Metadata Metadata
}

Expand Down

0 comments on commit 18dd896

Please sign in to comment.