Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MigrationList = []struct { ID string Description string Apply func(*mongo.Client) error }{ { ID: "2024_11_10_create_users_collection", Description: "Create users collection with _id, username, email, password, created_at, updated_at fields", Apply: createUsersCollection, }, { ID: "2024_11_09_unique_user_constraints", Description: "Add unique constraints on username, email, and id fields in users collection", Apply: addUniqueUserConstraints, }, { ID: "2024_11_10_create_tasks_collection", Description: "Create tasks collection with _id, title, description, completed, status, due_date, user_id, created_at, updated_at fields", Apply: createTasksCollection, }, }
MigrationList holds all migrations in order of application
Functions ¶
func ApplyMigrations ¶
ApplyMigrations checks and applies any pending migrations.
Types ¶
Click to show internal directories.
Click to hide internal directories.