Skip to content

Commit

Permalink
database scripts added (#6351)
Browse files Browse the repository at this point in the history
Signed-off-by: sonali wale <swale@msystechnologies.com>
  • Loading branch information
sonali523 authored and vinay033 committed Dec 13, 2021
1 parent 3ecdccc commit f177d87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (p *postgres) GetAutomateInfraServerUsers(ctx context.Context, serverId str
user := storage.User{}
if err := rows.Scan(&user.ID, &user.ServerID, &user.InfraServerUsername, &user.CredentialID, &user.Connector,
&user.AutomateUserID, &user.IsServerAdmin, &user.CreatedAt, &user.UpdatedAt); err != nil {
return nil, err // TODO: continue or return??
return nil, err
}
users = append(users, user)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CREATE INDEX IF NOT EXISTS users_automate_user_id_index ON users (automate_user_
-- create table org_users
CREATE TABLE IF NOT EXISTS org_users (
id TEXT PRIMARY KEY,
org_id TEXT NOT NULL references orgs(id) ON DELETE RESTRICT,
org_id TEXT NOT NULL,
user_id TEXT NOT NULL references users(id) ON DELETE RESTRICT,
is_admin BOOLEAN NOT NULL DEFAULT FALSE
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
- [`03_rename_column_admin_key_in_orgs.up.sql`](03_rename_column_admin_key_in_orgs.up.sql)
- [`04_convert_table_to_human_readable_ids.up.sql`](04_convert_table_to_human_readable_ids.up.sql)
- [`05_remove_orgs_pkey.up.sql`](05_remove_orgs_pkey.up.sql)
- [`06_user_management.up.sql`](06_user_management.up.sql)

0 comments on commit f177d87

Please sign in to comment.