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..

Hi! Where should be generated this class? ```Orm\Zed\Antelope\Persistence\PyzAntelopeQuery``` I went

U021WPVTUS2
U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi!
Where should be generated this class?

Orm\Zed\Antelope\Persistence\PyzAntelopeQuery

I went through all the steps in DataImport study but this class is not created

Β«1

Comments

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    should be generated by propel:install

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    I ran proper:install but class is not created

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    then check namespace and package values in your *.schema.xml

  • What was the output of propel:install?

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    ╰─$ console propel:install
    Store: DE | Environment: docker.dev
    Creating Database
    Adjust propel config for PostgreSQL and missing functions (group_concat)
    Clean schema directory
    Copy and merge schema files
    Build Propel2 classes
    Generate diff for Propel2
    262 tables found in all databases.
    Comparing models...
    Structure of database was modified in datasource β€œzed”: 1 added tables
    β€œ/data/src/Orm/Propel/Migration_pgsql/PropelMigration_1621433348.php” file successfully created.
    Please review the generated SQL statements, and add data migration code if necessary.
    Once the migration class is valid, call the β€œmigrate” task to execute it.
    Migrate database
    Executing migration PropelMigration_1621433348 up
    4 of 4 SQL statements executed successfully on datasource β€œzed”
    Migration complete. No further migration to execute.

  • And the content of the stated migration file?

  • (this is a topic for btw πŸ˜‰)

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ok, sorry)

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    cat PropelMigration_1621433348.php
    <?php

    use Propel\Generator\Manager\MigrationManager;

    /**
    * Data object containing the SQL and PHP code to migrate the database
    * up to version 1621433348.
    * Generated on 2021-05-19 14:09:08 by spryker
    */
    class PropelMigration_1621433348
    {
    public $comment = β€˜β€™;

    public function preUp(MigrationManager $manager)
    {
        // add the pre-migration code here
    }
    
    public function postUp(MigrationManager $manager)
    {
        // add the post-migration code here
    }
    
    public function preDown(MigrationManager $manager)
    {
        // add the pre-migration code here
    }
    
    public function postDown(MigrationManager $manager)
    {
        // add the post-migration code here
    }
    
    /**
     * Get the SQL statements for the Up migration
     *
     * @return array list of the SQL strings to execute for the Up migration
     *               the keys being the datasources
     */
    public function getUpSQL()
    {
        return array (
    

    β€˜zed’ => '
    BEGIN;

    CREATE SEQUENCE β€œpyz_antelope_pk_seq”;

    CREATE TABLE β€œpyz_antelope”
    (
    β€œid_antelope” INTEGER NOT NULL,
    β€œname” VARCHAR(255) NOT NULL,
    β€œcolor” VARCHAR(255) NOT NULL,
    PRIMARY KEY (β€œid_antelope”),
    CONSTRAINT β€œpyz_antelope-name” UNIQUE (β€œname”)
    );

    COMMIT;
    ’,
    );
    }

    /**
     * Get the SQL statements for the Down migration
     *
     * @return array list of the SQL strings to execute for the Down migration
     *               the keys being the datasources
     */
    public function getDownSQL()
    {
        return array (
    

    β€˜zed’ => '
    BEGIN;

    DROP TABLE IF EXISTS β€œpyz_antelope” CASCADE;

    DROP SEQUENCE β€œpyz_antelope_pk_seq”;

    COMMIT;
    ’,
    );
    }

  • Then I think that the sync is not working. Windows and vagrant?

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    No, mac os and docker

  • Can you check for the file inside of the container?

  • Any container, e.g. zed

  • Unknown
    edited May 2021

    Don't have the exact name at hand

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    Check the Migration file?

  • ah no, the php file

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    All files in zed_eu container)

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    Which one i should check?

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    the one that you're missing

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    src/Orm\Zed\Antelope\Persistence\PyzAntelopeQuery.php

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    if it's in container but not visible in phpStorm then it's docker sync issue

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes, it’s here

    bash-5.0# pwd
    /data/src/Orm/Zed/Antelope/Persistence
    bash-5.0# ls -la
    total 24
    drwxr-xr-x 4 spryker www-data 4096 May 19 12:59 .
    drwxr-xr-x 3 spryker www-data 4096 May 19 12:59 ..
    drwxr-xr-x 2 spryker www-data 4096 May 19 12:59 Base
    drwxr-xr-x 2 spryker www-data 4096 May 19 12:59 Map
    -rw-r--r-- 1 spryker www-dataΒ 450 May 19 12:59 PyzAntelope.php
    -rw-r--r-- 1 spryker www-dataΒ 488 May 19 12:59 PyzAntelopeQuery.php

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    How can i fix it?

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    what's the output of mutagen sync list? Do you have one or more sync sessions?

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    β€œcommand not found: mutagen” - did i forget to install it?

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    seams like it

  • U021WPVTUS2
    U021WPVTUS2 Posts: 25 πŸ§‘πŸ»β€πŸš€ - Cadet

    😬 thanks!

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    if you ever have sync issues again check that mutagen sync list only lists one sync session..not more

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 πŸ§‘πŸ»β€πŸš€ - Cadet

    if it does list 2+: run docker/sdk trouble