class CQL::Migration
Reference
< Object
Migrations are used to manage changes to the database schema over time. Each migration is a subclass of Migration
and must implement the up
and down
methods. The up
method applies the migration, while the down
method rolls back the migration.
Migrations are executed in version order, and the Migrator
class manages them, providing methods to apply, roll back, and track migrations.
Example: Creating a Migration
Methods
def up
Defines the operations to apply when the migration is run.
@return [Nil]
Example:
def down
Defines the operations to roll back the migration.
@return [Nil]
Example: