Group and User index elevated to primary key

This commit is contained in:
2020-10-06 13:31:04 +01:00
parent 681ad1a533
commit 76486ade5c

View File

@@ -149,7 +149,7 @@ uint64_t createUsersTable(struct stored_conn_t *sconn, struct modb_t *modb)
"`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, " "`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, "
"`updated` TIMESTAMP on update CURRENT_TIMESTAMP NULL DEFAULT NULL, " "`updated` TIMESTAMP on update CURRENT_TIMESTAMP NULL DEFAULT NULL, "
"`deleted` TIMESTAMP NULL DEFAULT NULL, " "`deleted` TIMESTAMP NULL DEFAULT NULL, "
"INDEX (`id`)" "PRIMARY KEY (`id`)"
")", 0); ")", 0);
if (strbld_finalize_or_destroy(&sb, &qry, &qry_len) != 0) { if (strbld_finalize_or_destroy(&sb, &qry, &qry_len) != 0) {
return (uint64_t)-1; return (uint64_t)-1;
@@ -178,7 +178,7 @@ uint64_t createGroupsTable(struct stored_conn_t *sconn, struct modb_t *modb)
"`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, " "`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, "
"`updated` TIMESTAMP on update CURRENT_TIMESTAMP NULL DEFAULT NULL, " "`updated` TIMESTAMP on update CURRENT_TIMESTAMP NULL DEFAULT NULL, "
"`deleted` TIMESTAMP NULL DEFAULT NULL, " "`deleted` TIMESTAMP NULL DEFAULT NULL, "
"INDEX (`id`)" "PRIMARY KEY (`id`)"
")", 0); ")", 0);
if (strbld_finalize_or_destroy(&sb, &qry, &qry_len) != 0) { if (strbld_finalize_or_destroy(&sb, &qry, &qry_len) != 0) {
return (uint64_t)-1; return (uint64_t)-1;