Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17528

Uncaught exception when adding autoincrement column in PostgreSQL

XMLWordPrintable

      Attempt to add autoincrement column to existing table, f.e.

      	public function update_schema(): array
      	{
      		return [
      			'add_columns'	=> [
      				$this->table_prefix . 'user_notifications'	=> [
      					'id'	=> ['UINT', null, 'auto_increment'],
      				],
      			],
      		];
      	} 

      causes uncaught exception:

      An exception occurred while executing a query: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error (at or near: "{") LINE 1: ...TABLE phpbb_user_notifications ADD id INT DEFAULT {{placehol... ^

      Resulting SQL running which causes that, is:

      ALTER TABLE phpbb_user_notifications ADD id INT DEFAULT {{placeholder_sequence}}

            Unassigned Unassigned
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: