Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter4 migration postgres
#3

(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
Reply


Messages In This Thread
CodeIgniter4 migration postgres - by mozzar - 11-17-2023, 08:46 AM
RE: CodeIgniter4 migration postgres - by mozzar - 11-24-2023, 04:57 AM
RE: CodeIgniter4 migration postgres - by kenjis - 11-24-2023, 01:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB