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 everyone, I'm having trouble creating a table in the b2c-demo-shop because of the following e

Options
U045KD44L7L
U045KD44L7L Posts: 55 🧑🏻‍🚀 - Cadet
edited March 2023 in Help

Hello everyone,
I'm having trouble creating a table in the b2c-demo-shop because of the following error:
Failed to execute SQL "CREATE TABLE pyz_players

Comments

  • U04TQ9UG04U
    U04TQ9UG04U Posts: 25 🧑🏻‍🚀 - Cadet
    edited March 2023
    Options

    I'm not sure but could it be because your unique index pyz_players-name ('name') is not specified above ??
    Maybe try to dump() the result of the command MigrationMigrateCommand (149) to try and get a hint on what is the issue.

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,029 ⚖️ - Guardians (admin)
    Options

    You could also try to manually execute the sql for a moment to check if there is some more exception message… (but dont forget to revert)

  • U045KD44L7L
    U045KD44L7L Posts: 55 🧑🏻‍🚀 - Cadet
    Options

    @U04TQ9UG04U Sorry for this late reply
    I have defined the unique index pyz_players
    just to make sure everything is correct
    I am sharing the Schema file I have created

    <?xml version="1.0"?>
    " name="zed" xsi:noNamespaceSchemaLocation="" namespace="Orm\Zed\Players\Persistence" package="src.Orm.Zed.Players.Persistence">

    <table name="pyz_players" idMethod="native" allowPkInsert="true" phpName="PyzPlayers">
        <column name="id_players" required="true" type="INTEGER" primaryKey="true" autoIncrement="true"/>
        <column name="player" required="true" type="VARCHAR"/>
        <column name="sports" required="true" type="VARCHAR"/>
        <unique name="pyz_players-name">
            <unique-column name="name"/>
        </unique>
        <id-method-parameter value="pyz_players_pk_seq"/>
    </table>
    

  • U045KD44L7L
    U045KD44L7L Posts: 55 🧑🏻‍🚀 - Cadet
    edited April 2023
    Options

    Hi, @florian.scholz The SQL worked , and I can now create new database tables.

    but, as soon as I run the command: docker/sdk console data:import,
    I receive the following error.

  • U045KD44L7L
    U045KD44L7L Posts: 55 🧑🏻‍🚀 - Cadet
    Options