Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, I have a problem with the propel:install, I have made my changes to an specific xml file, for

Options
U01V5MCB6AW
U01V5MCB6AW Posts: 6 🧑🏻‍🚀 - Cadet

Hello, I have a problem with the propel:install, I have made my changes to an specific xml file, for adding a new column to the spy_users table, but when I run the console proper:install It says that there is nothing new to migrate and when I look at the xml file which I made the change and saved, it is now gone.

Comments

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 🧑🏻‍🚀 - Cadet
    Options

    what file did you edit? if you edit a merged file it will be overridden.

  • U01V5MCB6AW
    U01V5MCB6AW Posts: 6 🧑🏻‍🚀 - Cadet
    Options

    spy_user.schema.xml, im editing the users schema to add a new column.
    So what I have to do is merge the file and then run propel:install? How can I properly merge the file?
    Thanks in advance.

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 🧑🏻‍🚀 - Cadet
    Options

    you have to add/modify file in src/Pyz/Zed/<>/Persistence/Propel/Schema. File needs to end with .schema.xml

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 🧑🏻‍🚀 - Cadet
    Options

    then when you run propel:install it will among other things run merge of core schemas and project level schemas. Result will be in src/ORM/Propel/<>/schema and that schema will be executed. If you modify schema in src/ORM/Propel/<>/schema it will be overriden next time you run propel:install

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 🧑🏻‍🚀 - Cadet
    Options

    so to add a column in spy_user.schema.xml you need to create a folder in your project i.e. src/Pyz/User/Persistence/Propel/Schema and add spy_user.schema.xml to it, with the column you want to add. Then you need to run propel:install

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 🧑🏻‍🚀 - Cadet
    Options

    Did you go through the bootcamp (https://training.spryker.com/courses/developer-bootcamp) @U01V5MCB6AW ? It is free and gives you basics for working with Spryker.

  • U01V5MCB6AW
    U01V5MCB6AW Posts: 6 🧑🏻‍🚀 - Cadet
    Options

    Sorry for the late reply, I went through documentation and did as you said in the upper comments, added the same folder structure and the same xml file containing only the new column, then run the propel:install and it worked!
    Thank you so much!