GORM Guides
GORM, a popular ORM in the Go community, provides basic schema migration capabilities using its AutoMigrate
feature,
suitable mostly for local development and small projects. For more advanced schema control, Atlas automates the process by comparing and
managing database states, integrating seamlessly with GORM projects.
Quick Start
Get started with Atlas and GORM.
Loading GORM Models Into Atlas
To use Atlas with GORM, there are two modes in which the Atlas GORM Provider can load your schema. Choose the one that suits your project setup.Standalone Mode
The common case. Use it if all of your GORM models exist in a single package and either embed gorm.Model or contain gorm struct tags.
Go Program Mode
Use in more advanced scenarios where you need more control specifying which structs to consider as models.
Managing Database Objects
Like many ORMs, GORM provides a way to define the most common database objects, such as tables, columns, and indexes using Go structs and tags. Atlas extends this capability by allowing you to define more advanced database objects such as composite types, domain types, and triggers.
Composite Types
Incorporate composite types into your GORM schema.
Domain Types
Define and use custom domain types within your GORM schema.
Enum Types
Implement enum types to represent fixed sets of values in your GORM schema.
Extensions
Enhance your GORM schema with PostgreSQL extensions.
Row-Level Security
Apply RLS policies to safeguard data in your GORM schema.
Triggers
Automate actions in your GORM schema using triggers.