Welcome Guest, Not a member yet? Register   Sign In
Database Migration
#8

(This post was last modified: 01-27-2022, 04:04 AM by 68thorby68.)

(01-22-2022, 09:33 AM)iRedds Wrote: There is currently a problem with the default value. The key only supports a string value.
You can define a database field as a string. Passing strings as fields

The force method expects an absolute path to the migration file.
Force

I'm not sure if migrations are what you need.
Perhaps it will be easier to use a SQL query template to generate tables.

Many thanks, I'll keep an eye out for the fix as this type of functionality is more than handy.

(01-22-2022, 07:59 PM)kenjis Wrote: I think you are going to wrong way.

The force() method is testing purpose only.
https://codeigniter4.github.io/userguide...html#force
> This method is recommended only for testing and could cause data consistency issues.

Thanks kenjis, I did note this but could not see another way utilising the Migrations to create a new set of empty table's. I suppose it's back to the tried and tested MySql create method, utilising Migrations for updates, unless you a have suggestions? I'm open to suggestions that use Ci4 functions like Migrations as the more I use Ci4 the more powerful I find it for all types of project development. Thanks again.
Reply


Messages In This Thread
Database Migration - by 68thorby68 - 01-21-2022, 02:20 PM
RE: Database Migration - by BilltheCat - 01-22-2022, 01:42 AM
RE: Database Migration - by InsiteFX - 01-22-2022, 02:48 AM
RE: Database Migration - by 68thorby68 - 01-22-2022, 04:08 AM
RE: Database Migration - by 68thorby68 - 01-22-2022, 07:29 AM
RE: Database Migration - by iRedds - 01-22-2022, 09:33 AM
RE: Database Migration - by 68thorby68 - 01-27-2022, 03:56 AM
RE: Database Migration - by kenjis - 01-22-2022, 07:59 PM
RE: Database Migration - by kenjis - 01-27-2022, 04:16 AM
RE: Database Migration - by 68thorby68 - 01-27-2022, 04:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB