2026-09-01 00:56:15 +02:00
2026-09-01 00:56:15 +02:00
2026-09-01 00:56:15 +02:00
2026-09-01 00:56:15 +02:00
2026-09-01 00:56:15 +02:00
2026-09-01 00:56:15 +02:00
2026-09-01 00:56:15 +02:00
2026-09-01 00:56:15 +02:00

PoC of Go with GORM and Migrations

  • This PoC creates a simple entity, with migrations and calls for Sqlite, but should work with Postgres too
  • Migrations are embedded into the applications so they can be applied on startup

Learning

  • The table names are specified using the TableName function (see entities.go)
  • gorm.Model requires the basic columns, see 0001_init.up.sql
  • Migration scripts have the name structure {version}_{title}.up.{extension} and {version}_{title}.down.{extension}
S
Description
No description provided
Readme
27 KiB
Languages
Go 100%