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
0
votes
2 answers

Using "Point"-Datatype in Phinx-Migration (in CakePhp)

I'm creating an API for POIs and use the POINT-Type to store the coordinates. As my company uses CakePHP I have to write a migration-script with Phinx. But I don't have any Idea how to correctly create a column with the POINT-Type. Sure, I just…
Dennis Richter
  • 522
  • 6
  • 16
0
votes
2 answers

Import sql file into mysql via command line

I have a little weird problem. I would like to import sql file via command line. Command looks like mysql -u root -p root pdweb-sandbox < C:\Apache24\htdocs\pdweb-sandbox\migrations/init.sql But if there is password explicitly typed in command it…
Čamo
  • 3,863
  • 13
  • 62
  • 114
0
votes
2 answers

add column with primarykey migrations on update cakephp

I am writing migrations script in cakephp 3 using Phinx. I need to add a column with primary key while updating the table(using update() command) using migrations. But when I run the script, it created the column but does not include the primary…
Dhruv
  • 27
  • 5
0
votes
2 answers

Truncate all tables before running seed files with Phinx

So, I have been creating migrations using Phinx. I want to be able to truncate all the tables(148 tables) before running the seed files. I am thinking about just creating a seed file that will be ran first and then it will truncate all the tables.…
hjcoder18
  • 449
  • 1
  • 5
  • 13
0
votes
1 answer

Access denied when running phinx command on Docker container

I am running the official MySQL Docker container for my PHP app. I am using Phinx for migrations. The MySQL image seems to work fine as I can connect to it as 'dbuser' (non-root) using MySQL Workbench. I can also connect with Docker exec as…
0
votes
0 answers

CakePHP and Phinx addForeignKey fails, duplicate column

I'm trying to create a migration to add a foreign key to an existing column, it looks like this: use Migrations\AbstractMigration; class AddForeignKeyIndexToPoints extends AbstractMigration { public function up() { …
toby1kenobi
  • 1,609
  • 1
  • 14
  • 24
0
votes
1 answer

Customized Phinx Symfony command with multiple app bootstrap

I'm using Phinx to execute migrations across 100s of applications on multiple servers. Every application should execute same migrations. In order to do this there is a instance of app on central server which is aware of all configs and other…
Vladimir Cvetic
  • 832
  • 3
  • 8
  • 23
0
votes
1 answer

Phinx path with subfolders

i want to have a better overview on the phinx migration files. i want something like this /db/migration/1.8.5/ID-2065/my_file_name_1234567890 So i can use 'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations/'. $_ENV['APP_VERSION'], In the docs…
Rogoit
  • 81
  • 7
0
votes
1 answer

Phinx seeds won't run after upgrade to php7.0

I have a bunch of Phinx seeds which used to run fine php vendor/bin/phinx seed:run My seeds are located in var/www/html/db/seeds folder I recently upgraded my VM to php 7.0 (Also upgraded to 16.04 LTS box), now I get the following output & error…
Jack hardcastle
  • 2,748
  • 4
  • 22
  • 40
0
votes
1 answer

How to set Phinx migrations to create migration class with up/down method

Can you tell me please if is possible to set Phinx migrations to create migration class with up/down method instead of change which is default option? Thanks.
Čamo
  • 3,863
  • 13
  • 62
  • 114
0
votes
0 answers

Illuminate Database outside Laravel with Phinx for migrations

I'm working on a project where I'm using Illuminate's database component outside of Laravel 4.2 and trying to use Phinx for migrations from the command line. I've set up my database environments in the phinx.yml file for production, development,…
user3361594
0
votes
1 answer

Creating an Alias in Windows

I have the command below. php public/index.php phinx setup Is there a way in which I could simplify this in Windows? I was wanting to create a shortcut/alias as shown below. phinx setup Any help would be appreciated.
hawx
  • 1,629
  • 5
  • 21
  • 37
-1
votes
2 answers

MySQL: How do you query on a compound-primary-key? Specifically, a NOT IN query?

I have a comment table and a comment_edit table, as well as olddb_edit. Simplified, the relevant table looks like this: CREATE TABLE `olddb_edit` ( edit_id INT NOT NULL, edit_time INT NOT NULL, edit_text TEXT NOT NULL, PRIMARY KEY…
WoodrowShigeru
  • 1,418
  • 1
  • 18
  • 25
-2
votes
1 answer

How to run migration with phinx on symphony4 without console?

Hello programmers from around the world. I am trying to run a migration when a class is executed. It is currently working like this: When the customer signs up, the class register my customer, so automatically, it should creates a database on my…
1 2 3 4 5 6
7