Skip to content

Commit

Permalink
remove id field (ref: #15)
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Mar 16, 2021
1 parent ec5b028 commit 13c906b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup_app/installers/rdbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ def create_tables(self, jans_schema_files):
else:
doc_id_type = self.get_sql_col_type('doc_id', sql_tbl_name)
if Config.rdbm_type == 'pgsql':
sql_cmd = 'CREATE TABLE "{}" (id SERIAL, doc_id {} NOT NULL UNIQUE, "objectClass" VARCHAR(48), dn VARCHAR(128), {}, PRIMARY KEY (id, doc_id));'.format(sql_tbl_name, doc_id_type, ', '.join(sql_tbl_cols))
sql_cmd = 'CREATE TABLE "{}" (doc_id {} NOT NULL UNIQUE, "objectClass" VARCHAR(48), dn VARCHAR(128), {}, PRIMARY KEY (id, doc_id));'.format(sql_tbl_name, doc_id_type, ', '.join(sql_tbl_cols))
else:
sql_cmd = 'CREATE TABLE `{}` (`id` int NOT NULL auto_increment, `doc_id` {} NOT NULL UNIQUE, `objectClass` VARCHAR(48), dn VARCHAR(128), {}, PRIMARY KEY (`id`, `doc_id`));'.format(sql_tbl_name, doc_id_type, ', '.join(sql_tbl_cols))
sql_cmd = 'CREATE TABLE `{}` (`doc_id` {} NOT NULL UNIQUE, `objectClass` VARCHAR(48), dn VARCHAR(128), {}, PRIMARY KEY (`id`, `doc_id`));'.format(sql_tbl_name, doc_id_type, ', '.join(sql_tbl_cols))
self.dbUtils.exec_rdbm_query(sql_cmd)
tables.append(sql_cmd)

Expand Down

0 comments on commit 13c906b

Please sign in to comment.