Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Munto
    @Munto
    Hello guys
    Thank you for your answer Rob :)
    @caioguedes, I would say yes
    Just do it ! ;p
    Rob Morgan
    @robmorgan
    FYI - We are doing away with individual development branches. master will shortly become the default again.
    Munto
    @Munto
    Ah great !
    It will clearly make contributions easier :smile:
    BassemN
    @BassemN
    Hello
    How can I write tinyint(2) with phinx?
    Munto
    @Munto
    Hello @BassemN !
    Are you using MySQL as DBMS ?
    I know you can add a column as tinyint by writing something like that :
    $table->addColumn('myfield', 'integer', ['limit' => MysqlAdapter::INT_TINY])->save();
    but the limit is setted to 4 on my environment
    I don't think you can specify it via Phinx's adapters
    Jeroen Stolp
    @jsxhawk_twitter
    Hellooo
    I'm trying to run a migration though Phinx, i have some NUL bytes in my data (it's a JSON) field.
    Doesn Phinx support the ~* operator? the query runs fine if i execute it in psql but using the same statement in phinx doesn't yield results
    $result = $this->fetchAll("SELECT * FROM table WHERE column::text ~* '[^\\\\]\\u0000'");
    Nick D
    @Azotherian
    Hello everyone. Thank you for making a great product like Phinx, but I do have a question. I was wondering how to add a stored procedure to my migration? I need one, and I can't find anything in the documentation
    Jeroen Stolp
    @jsxhawk_twitter
    Heey Nick, its not possible using shorthand functions like $table->create()
    But you can use the $this->execute ('CREATE STORED ...'); to run any arbitrary SQL. Even invoke or create a SP as far as I know.
    Haven't tested it myself but it'll accept any SQL you feed it and passes it on to the DB and returns number of affected rows.
    John Congdon
    @johncongdon
    Hi all, no rush, but I was wondering what the release schedule is? My PR was just merged to master today, but I'm wondering when it will be picked up my composer without resorting to dev-master.
    Matthew-Underwood
    @Matthew-Underwood
    Hello, just wanted to clear up some misunderstanding on my part. I see that it has support for multiple environments. How can I make migration files choose certian databases
    My bad. Was typing this then realized what the solution might be. But accidentally submitted the msg.
    Matthew-Underwood
    @Matthew-Underwood
    Hello there, just got a question. How does this library work with multiple databases? My understanding is that on the phinx.yml the enviroments are different database servers which may have different logins etc. But I cant understand how in the migration file you specific what table belong to what database. This question is for the table object functionality, as im guessing with raw sql statements you can use USE DATABASE statement.
    Phiter Fernandes
    @phiter
    hey dudes
    and girls
    I have a question. We're thinking about starting to use phinx (we don't use migrations yet)
    the database is already quite huge and we can't generate migrations for every table and stuff, and the generator that I found isn't compatible with our Mysql version
    my idea is to generate a SQL only of the database structure, and use it as a first migration, to generate in case your database is empty
    how could I do that? What would I need to set up to make it so the first migration is not executed in the production server, where the database is already done, for example? Or maybe I can ignore it since it'll validate if the tables exist. What do you guys think:?
    Tabakhase
    @tabakhase

    @phiterf

    the generator that I found isn't compatible with our Mysql version

    what did you try? i just recently used&updated a MySQL2Phinx-fork -- even supports VIEW┬┤s on experimental https://github.com/tabakhase/MySQL2Phinx/tree/experimental

    What would I need to set up to make it so the first migration is not executed in the production server

    manually create the phinxlog table and mark the migration as "done" in there

    Phiter Fernandes
    @phiter
    @tabakhase I made some changes to add support for set and float, and it worked
    thanks!
    Phiter Fernandes
    @phiter
    hey guys
    damn no new messages after all this time
    so we're using phinx here now and we just came to a problem
    I have created a first_migration that has all the tables in the database, and then a migration that picks data from the production server and inserts locally after the first migration. After that there are some new migrations, and the issue we're having now is that one of these tables that are read in the seeder migration has been changed by a migration
    so now the production server has a new column that the first migration doesn't create, and when we run the seeder, it throws an unknown column error
    idk what to do
    Phiter Fernandes
    @phiter
    alright so I got into a different solution
    I removed the dependency of getting data from the production server and put those default data in json files, since when we add new data to those tables it's done trough new migrations
    Marcos Dantas
    @lpj145
    hi everybody.
    all is ok ?
    guy's when develop new skeleton to my applications on various lib's based..
    i think use phinx to manage migrations...
    but i not found some method to inject config on PhinxApplication without create a new Application and inject all commands phinx with -c argument passed..
    someone tried it sometimes ? whats ways to go ?
    J. King
    @JKingweb
    Is there a particular reason not to use array casts, from a stylistic perspective? I'd like to shore up Phinx's SQLite tests, and there's some very low-hanging fruit with conversion from strings to arrays.
    J. King
    @JKingweb
    Also, is there any minimum version of any database which Phinx targets?