command
module
Version:
v1.0.4
Opens a new window with list of versions in this module.
Published: Sep 21, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
OpenAuth
Migrations Basic Commands
Create a new migration
migrate create -ext sql -dir resources/migrations/postgresql -seq create_users_table
This creates two files:
000001_create_users_table.up.sql - Forward migration
000001_create_users_table.down.sql - Rollback migration
Run migrations
Rollback migrations
Check migration status
Troubleshooting
Dirty Database State
If you encounter the error: Dirty database version X. Fix and force version.
This means a migration failed partway through. Here's how to fix it:
-
Investigate the failed migration:
Note down the migration no which is failed and fix the migration files.
-
Manually inspect your database:
- Connect to your database
- Check what changes were partially applied
- Look for incomplete tables, indexes, or constraints
-
Clean up the database manually:
- Remove any partially created objects
- Ensure the database is in a consistent state
-
Force set the version:
- update .yml file ForceVersion: version_numer
- update .yml file Action: force
- run the migration
make migrate
-
Fix the problematic migration and retry:
# Edit the migration file
vim migrations/000010_problematic_migration.up.sql
# Run migrations again
- update .yml file Action: up
make migrate
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
api
|
|
|
|
Package openauth_v1 is a reverse proxy. |
cmd
|
|
|
|
|
|
|
|
internal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pkg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.