Adonis 5: Table Prefix #1358
-
I am trying to have table prefix as 'tbl_', however, it gives me following TypeScript error. My Config: pg: {
client: 'pg',
connection: {
host: Env.get('DB_HOST', '127.0.0.1') as string,
port: Number(Env.get('DB_PORT', 5432)),
user: Env.get('DB_USER', 'lucid') as string,
password: Env.get('DB_PASSWORD', 'lucid') as string,
database: Env.get('DB_NAME', 'lucid') as string,
},
healthCheck: true,
prefix: 'tbl_',
}, The Error:
Am I doing something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Where in the docs you read that you can prefix tables? |
Beta Was this translation helpful? Give feedback.
-
I read it in v4.1 docs at https://adonisjs.com/docs/4.1/database#_table_prefixing and thought it will be available for v5 as well. |
Beta Was this translation helpful? Give feedback.
-
For others, the answer is #1358 (reply in thread) |
Beta Was this translation helpful? Give feedback.
For others, the answer is #1358 (reply in thread)