CodeIgniter4 migration postgres |
Hello,
I'm using ci4 with postgres database. I have 2 questions: - Is it possible to set the database schema in the .env file so that the migration creates my tables in the correct schema? - Is it possible to add a comment to the table at the migration stage Thanks for your help (11-17-2023, 08:46 AM)mozzar Wrote: - Is it possible to set the database schema in the .env file so that the migration creates my tables in the correct schema? No. You can write only Config values in .env. You can know Config items when you see files in app/Config/. (11-17-2023, 08:46 AM)mozzar Wrote: - Is it possible to add a comment to the table at the migration stage Yes, but there is no methods for PostgreSQL's comments. So you need to run SQL queries with query() method. See https://codeigniter4.github.io/CodeIgnit...ar-queries In migration files, you can get the db connection object as $this->db. https://codeigniter4.github.io/CodeIgnit...reign-keys |
Welcome Guest, Not a member yet? Register Sign In |