Questions tagged [phinx]

Database migration tool for PHP apps.

About

Database migrations tool for PHP apps..Phinx is just about migrations without all the bloat of a database ORM system or framework.

Links

GitHub

Phinx

104 questions
1
vote
1 answer

How to migrate column type DOUBLE via cakephp phinx migrations?

I'm trying to migrate table from db1 to db2 with using Phinx migrations, but i have a problem with one table where i have column type DOUBLE. I know that supported types are there Phinx column type, but it is possible to specify FLOAT type to get…
MatosKW
  • 15
  • 1
  • 2
  • 10
1
vote
1 answer

Phinx migrations sqlite memory phpunit

Phinx migrations using sqlite memory don't appear to be working in 0.9.2, I have a very simple app with one table (product). After running the migration the product table doesn't exist: use Symfony\Component\Yaml\Yaml; use Phinx\Config\Config; use…
1
vote
0 answers

Phinx and PHPUnit

I'm running PHPUnit 5, with DBUnit 2.0.3, and Phinx 0.8.2. I'm trying to set up a test with a SQLite in memory database: abstract class ApiTest extends PHPUnit_Extensions_Database_TestCase { protected $pdo; public function getConnection() …
GluePear
  • 7,244
  • 20
  • 67
  • 120
1
vote
1 answer

when phinx migrate, string in double quotes("") is not recognized correctly

I have migration using phinx, above picture is the data seed. (I just boxed out some sections, sorry for it) As you can see, there are blue color characters which are not recognized and I don't know why... They are within double quotes " " and I…
kispi
  • 185
  • 1
  • 12
1
vote
2 answers

tried to bind parameter number 2101. sql server supports a maximum of 2100 parameters

I am trying to run some migrations through phinx to MSSQL, when I execute my query turns out getting the following message "tried to bind parameter number 2101. sql server supports a maximum of 2100 parameters" I have been looking for a solution for…
popquinto
  • 33
  • 3
  • 8
1
vote
1 answer

CakePHP 3 Skip Migration in Production

I have a Migration that failed in production after executing several commands that I can not execute again, is there a way to skip a migration?
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
1
vote
1 answer

CakePHP 3 Delete Row From Database using Migrations

I was taking a look at https://book.cakephp.org/3.0/en/migrations.html but I did not see anything about deleting a row from the database using Migrations... How can I delete a row from a table using the migrations shell?
Jeffrey L. Roberts
  • 2,844
  • 5
  • 34
  • 69
1
vote
1 answer

How can i add default value when i want to create new table via console

I have shell command like this. Tell me please, how can i add default value to this query ? bin/cake bake migration CreateProducts name:string description:text created modified
1
vote
3 answers

CakePHP Migration Creating a new table causes duplicate column name

I created a new Migration script on CakePHP 3 using the following command bin/cake bake migration CreateOfficialTeams id:int name:string topic_id:int The id field should be the primary key, and topic_id is a foreign key. The script comes out like I…
Brady Pacha
  • 313
  • 3
  • 15
1
vote
1 answer

Phinx transaction doesn't work

Trying to figure out how transaction works at phinx package. Here is my migration code and it doesn't work. I use mysql and everything is ok with phinx.yml. So table acme is created while table fail fails and no records are found in phinxlog table.…
Denys Klymenko
  • 394
  • 5
  • 18
1
vote
1 answer

Phinx database migration tool

Phinx is nice tool to database migration and it is working fine with terminal creating tables and seeding data into it by commands, but I want to see some output on the browser from this code before inserting into the tables can anyone help me out…
zarpio
  • 10,380
  • 8
  • 58
  • 71
1
vote
1 answer

`The foreign key constraint is incorrectly formed` in Phinx Migrations (CakePhp3)

I have these two migration files, and I want to add the primary key of "clients" as a foreign key in "samples" but when migrating, it gives me an error that "The foreign key constraint is incorrectly formed". Here is the screenshot of the command…
Subhan
  • 1,544
  • 3
  • 25
  • 58
1
vote
2 answers

Php - phinx migration

I am using phinx for migrations in my web app. my phinx.yml: paths: migrations: %%PHINX_CONFIG_DIR%%/migrations environments: default_migration_table: app_migrations default_database: app_database development: …
Creative crypter
  • 1,348
  • 6
  • 30
  • 67
1
vote
1 answer

Migration in cakephp3

I am new to cakephp3.refer http://book.cakephp.org/3.0/en/migrations.html and try to create database using terminal.for example: bin/cake bake migration CreateProducts name:string description:text created modified this command create file and when…
Krunal Dave
  • 272
  • 6
  • 16
1
vote
3 answers

Adding a Foreign Key Using Phinx

I'm trying to add foreign keys to a table using a Phinx migration. My intention is to create a table ('sales_order_attachment') and add two foreign keys. There's not too much Phinx documentation, so I haven't found an answer on the internet or…
Alec Walczak
  • 427
  • 1
  • 5
  • 17