Mysql or Postgres in hipchat addon


#1

Hi,

In my hipchat addon I used Redis memory database,and it works fine.However I want to use MariaDB or postgres db for storing client in my addon.
When I set the config for postgres,I can not access to database.Also I should define the ac.store to postgres db in the app.js? Please let me know how to use postgres or Mysql in my addon.

Thank you


#2

What errors are you getting? Are able to access it directly from that server?


#3

Hi,

I get this Error:

{ error: relation "AddonSettings_clientKey_idx" already exists
    at Connection.parseE (/home/emkey/roundee-third-party-app/node_modules/pg/lib/connection.js:534:11)
    at Connection.parseMessage (/home/emkey/roundee-third-party-app/node_modules/pg/lib/connection.js:361:17)
    at Socket.<anonymous> (/home/emkey/roundee-third-party-app/node_modules/pg/lib/connection.js:105:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:551:20)
  name: 'error',
  length: 102,
  severity: 'ERROR',
  code: '42P07',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  file: 'index.c',
  line: '595',
  routine: 'index_create' }
{ error: relation "AddonSettings_key_idx" already exists
    at Connection.parseE (/home/emkey/roundee-third-party-app/node_modules/pg/lib/connection.js:534:11)
    at Connection.parseMessage (/home/emkey/roundee-third-party-app/node_modules/pg/lib/connection.js:361:17)
    at Socket.<anonymous> (/home/emkey/roundee-third-party-app/node_modules/pg/lib/connection.js:105:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:551:20)
  name: 'error',
  length: 96,
  severity: 'ERROR',
  code: '42P07',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  file: 'index.c',
  line: '595',
  routine: 'index_create' }
{ error: relation "AddonSettings_clientKey_idx" already exists