mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-26 13:48:53 +08:00
NOISSUE - remove owner id from user table and object (#1303)
* remove owner id Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com> * remove owner id Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
This commit is contained in:
parent
9864b27271
commit
18dd8967cc
@ -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)`,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -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"`
|
||||
|
@ -38,9 +38,6 @@ type User struct {
|
||||
ID string
|
||||
Email string
|
||||
Password string
|
||||
OwnerID string
|
||||
Owner *User
|
||||
Groups []Group
|
||||
Metadata Metadata
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user