Skip to content

Fix message_update_7013 failing on PostgreSQL.#173

Open
RoSk0 wants to merge 1 commit intoGizra:7.x-1.xfrom
RoSk0:message-mid-postgres
Open

Fix message_update_7013 failing on PostgreSQL.#173
RoSk0 wants to merge 1 commit intoGizra:7.x-1.xfrom
RoSk0:message-mid-postgres

Conversation

@RoSk0
Copy link

@RoSk0 RoSk0 commented Mar 17, 2017

Latest message update message_update_7013() is failing on PostgreSQL with :

SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "message_mid_seq" already exists.

because on PostgreSQL serial fields are not NULLs by default. Check Drupal driver for PostgreSQL here includes/database/pgsql/schema.inc:181 DatabaseSchema_pgsql::protected function createFieldSql()

if (isset($spec['type']) && $spec['type'] == 'serial') {
  unset($spec['not null']);
}

and includes/database/pgsql/schema.inc:252 DatabaseSchema_pgsql::protected function processField()

if (isset($field['type']) && $field['type'] == 'serial') {
      unset($field['not null']);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants