Amazing Tool For Handling Database Migrations In Golang

Sdílet
Vložit
  • čas přidán 2. 05. 2024
  • ► Join my Discord community for free education 👉 / discord
    ► Exclusive Videos, Mini courses, Resume reviews, and coaching 👉 thetotalcoder.com
    ► 33% OFF on my Go + HTMX + Templ Course 👉bit.ly/3UFruxO
    ► Enjoy a 60% Black Friday Discount on My Golang Course 👉 fulltimegodev.com
    ► Follow me on Twitter 👉 / anthdm
    ► Follow me on GitHub 👉 github.com/anthdm
    SUBSCRIBE OR NO MARGARITAS
    ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
    ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
    ╠╗║╚╝║║╠╗║╚╣║║║║║═╣
    ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

Komentáře • 33

  • @anthonygg_
    @anthonygg_  Před měsícem +1

    ► 33% OFF on my Go + HTMX + Templ Course PRESALE bit.ly/3UFruxO
    ► Exclusive Videos, Mini courses, Resume reviews, and coaching thetotalcoder.com
    ► Join my Discord community for free education discord.com/invite/Ac7CWREe58
    ► 60% OFF on my Golang course fulltimegodev.com
    Goose GitHub: github.com/pressly/goose
    Thanks for watching

  • @demmidemmi
    @demmidemmi Před měsícem +9

    From the video I'm not sure in what way goose is different from go migrate? Other than it being more 'batteries included' it seems.

  • @dandogamer
    @dandogamer Před měsícem +10

    Personally I use 'atlas' for my migrations

  • @micahshellhamer3794
    @micahshellhamer3794 Před měsícem

    I literally just used it for the first time before seeing this! It's pretty easy to use.

  • @kennedymbogo542
    @kennedymbogo542 Před 29 dny

    This is nice. Wanted to try dbmate next after go migrate but I think I might go with goose now.

  • @kwe4117
    @kwe4117 Před 23 dny +1

    What’s wrong with GORM auto migration ?

  • @prmshzkarmacharya2069
    @prmshzkarmacharya2069 Před měsícem

    I have been using goose for last few go projects😊

  • @devoverlord
    @devoverlord Před 29 dny +3

    @anthonygg this is great and all, but how do you apply them in production? Do you use Github Actions, or some sort of serverless function in whatever cloud provider, or do you just execute migration on init of your service? If on init of the service, how do you handle that init when you scale the service?

  • @mohammedaabida1865
    @mohammedaabida1865 Před 29 dny

    Really nice video . Can you make a video an optimal solution on how to implement a background download process. When user request multiple download(restrict the duplicate requests). the requests will be sent to the server it can be add it in the queue and process in the background job. User can view the progress of the download in the frontend and the status of the download. Appreciate your work 👏

  • @sipatha
    @sipatha Před 27 dny

    You missed adding the goose URL in the description as promised

  • @Noudapi
    @Noudapi Před 28 dny

    I use liquibase, pretty nice

  • @zoop2174
    @zoop2174 Před měsícem +3

    I have used goose before, and it's great. But when I switched to Bun for my db queries (I had issues with sqlx and the basic go sql is a pita) I just also switched to their migration system. Just to keep it lean.
    One has to make sure to always write "CREATE TABLE IF NOT EXISTS" when you switch db migration tools.

  • @KiraleosAkis
    @KiraleosAkis Před 28 dny +1

    hey anthony, what theme do you use for vs code? looks nice

  • @cristianortiznavia7595
    @cristianortiznavia7595 Před měsícem +2

    What do You think about sqlc, to manage db operations in go?

    • @massy-3961
      @massy-3961 Před měsícem

      It’s good for making focused functions, but if you try to make general dynamic repositories it’s really hard to set up. But it’s pretty solid overall.

  • @thoriqadillah7780
    @thoriqadillah7780 Před měsícem

    Personally i never found using sql fun for migration. If i want to create a migration, I'll make sure its just simple. So my go to migration solution is actually laravel zero (laravel CLI only). So far laravel has the most complete yet easy when it comes to database related
    The minus is we need to keep up yet another repo for our migration. But for my personal experience, it was never an issue

  • @burionyt
    @burionyt Před měsícem +4

    how is go migrate in comparison to this ?

    • @anthonygg_
      @anthonygg_  Před měsícem +1

      Its a bit harder to setup. Goose just makes sense

    • @dandogamer
      @dandogamer Před měsícem +6

      Last time I tried go-migrate it was pretty bad. Because of the order it uses to apply migrations but also it frequently put my migrations into a "dirty" state where I was unable to then apply more migrations or rollback

    • @joelv4495
      @joelv4495 Před 28 dny

      @@dandogamer I also don't like that gomigrate only maintains the current schema version id. Could be an issue when multiple people are generating migrations and the migrations hit "out of sequence".

  • @stefantolksdorf2576
    @stefantolksdorf2576 Před měsícem +3

    atlas ftw

  • @stuartrobinson4217
    @stuartrobinson4217 Před 27 dny +1

    I wish this guy would take the time to learn how to type

    • @anthonygg_
      @anthonygg_  Před 27 dny

      I cant due to my ADD, and ADHD. This is no joke. The reason this happens is because my mind is already processing the next step, hence failing to coordinate the next letter to type. I tried with slowing down, but that not always helps. 😓

    • @anthonygg_
      @anthonygg_  Před 27 dny

      Tips welcome

  • @dirty-kebab
    @dirty-kebab Před měsícem +2

    I wasn't using migration tools, but am working on a big refactor and will eventually need to migrate. This is totally useful.
    Maybe run us through an example? Pls not a 1 hour video tho, even when Prime does it, bro I need to feed my kids 😂