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..
Hey everyone! I have deadly noob question…. 😞 I’m trying to make proper migration, but
Hey everyone!
I have deadly noob question…. 😞
I’m trying to make proper migration, but getting
Unable to get sequence id.
when I’m trying to make any operations with the DB.
Here is the Schema:
<?xml version="1.0"?> <database xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" name="zed" xsi:noNamespaceSchemaLocation="<http://static.spryker.com/schema-01.xsd>" namespace="Orm\Zed\HelloSpryker\Persistence" package="src.Orm.Zed.HelloSpryker.Persistence"> <table name="pyz_hello_spryker_vol_2"> <column name="id_hello_spryker" required="true" type="INTEGER" autoIncrement="true" primaryKey="true"/> <column name="reversed_string" required="true" type="VARCHAR" size="128"/> <id-method-parameter value="pyz_hello_spryker_vol_2_pk_seq"/> </table> </database>
Thanks for any advice.
Comments
-
hi
0 -
i assume you are using the current default postgres?
0 -
the only difference to an example i have here that i can spontaneously see is the
idMethod
<table name="pyz_hello_spryker" idMethod="native">
0 -
can you please try that?
0 -
Yes. It's default docker-based setup on Mac
0 -
@UJN2JRU4F Tried it, but now I'm getting error during propel:install. Smth like "can't create index pyz_......". Aborted. I can copy exact error message in an hour if it would help
0 -
might be worth checking
0 -
almost sounds like it is already present
0 -
possible for you to start over?
0 -
let’s have a look at the full error first
0 -
Tried to start from the very beginning, but the result is the same
0 -
@UJN2JRU4F
Ok. Created new schema<?xml version="1.0"?> <database xmlns="spryker:schema-01" xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" xsi:schemaLocation="spryker:schema-01 <https://static.spryker.com/schema-01.xsd>" name="zed" namespace="Orm\Zed\HelloSpryker\Persistence" package="src.Orm.Zed.HelloSpryker.Persistence"> <table name="pyz_hello_spryker_new" idMethod="native"> <column name="id_hello_spryker" required="true" type="INTEGER" autoIncrement="true" primaryKey="true"/> <column name="reversed_string" required="true" size="128" type="VARCHAR"/> <id-method-parameter value="pyz_hello_spryker_new_pk_seq"/> </table> </database>
Migration - success.
Still getting the same error.0 -
Ah, and tried to execute
SELECT nextval('pyz_hello_spryker_new_pk_seq')
directly at PgSQL and it works…Returns 1 as a result0 -
Another fact - switched to MySQL instead of Postgres.
docker/sdk up
and…..
Voila! 🙂 Everything remains the same….Dang…Panic mode - ON!….
0 -
🤔
0 -
Need to have a deeper look tomorrow, sorry. What's your timezone?
0 -
Emmm……And now the most interesting part! 🙂
After switching to MySQL (then bootstrapping app again)
After getting back to Postgres (then bootstrapping app again)
After 3 errors and docker restart - it eventually worked!!!!So THANK YOU SO MUCH for your time @UJN2JRU4F!!
But for now it looks like question dismissed…
So have a great evening (rest of the day)!
P.S. In case - my TZ is GMT+2 . Since I’m learning Spryker now - you’ll see lots of questions from me 🙂 Soooorrryyy ….0 -
You're welcome! Questions are very welcome!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 899 Developer Corner
- 760 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 24 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random