Database Migration not being applied.
jrairuf
HOBBYOP

12 days ago

Project Id: 43353f5c-6fd8-4840-ad56-c1c28725e937

Solved$10 Bounty

25 Replies

jrairuf
HOBBYOP

12 days ago

The project id is: 43353f5c-6fd8-4840-ad56-c1c28725e937


jrairuf
HOBBYOP

12 days ago

I'm basically not being able to execute a migration script iwthin my postgres database.


Railway
BOT

12 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 12 days ago


Are there any errors in your database logs?


And are you trying to run a migration script in your Dockerfile or during the build process?


jrairuf
HOBBYOP

12 days ago

Yeah...

image.png

Attachments


jrairuf
HOBBYOP

12 days ago

After build process, manually


Are you trying to create a trigger?


jrairuf
HOBBYOP

12 days ago

No... this migration script fill up the DB with needed tables


What does your SQL script look like?


jrairuf
HOBBYOP

12 days ago

I'm gonna send you:


jrairuf
HOBBYOP

12 days ago

(no markdown available for this content)

Attachments


At the bottom you have a loop that creates the triggers. Try adding a DROP statement for the trigger before adding it.


The error is caused by trying to create preexisting triggers.


jrairuf
HOBBYOP

12 days ago

One thing that can be useful, is that i'm trying to apply this same script using dbeaver, from my local machine, and it simply runs... No error, nothing. But when i use the web interface, it don't apply the changes to database


I assume you're using the public URL?


jrairuf
HOBBYOP

12 days ago

Yep


jrairuf
HOBBYOP

12 days ago

image.png

Attachments


Try running individual sections instead of running a whole script and see which parts aren't being ran.


jrairuf
HOBBYOP

12 days ago

Okay


jrairuf
HOBBYOP

12 days ago

Reviewing the script, now i've found one thing: I start the cript with begin (starting a new transaction), but the commit is missing.


jrairuf
HOBBYOP

12 days ago

Tcha!!!


jrairuf
HOBBYOP

12 days ago

It was that!


Good to know haha


jrairuf
HOBBYOP

12 days ago

We're done here. Thanks for your time and attention!!!



Status changed to Solved 0x5b62656e5d 12 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...