Module: OllamaChat::Database::Models::Migrations

Defined in:
lib/ollama_chat/database/migrations.rb

Overview

The OllamaChat::Database::Models::Migrations module is responsible for defining and executing the database schema for the application's persistent models.

This module contains a single class method, run, which is invoked during the application's initialization to ensure the database is properly set up.

Class Method Summary collapse

Class Method Details

.run(db) ⇒ Object

Executes the database migrations to set up the required tables.

Parameters:

  • db (Sequel::Database)

    The database connection to run the migrations against.



13
14
15
16
# File 'lib/ollama_chat/database/migrations.rb', line 13

def self.run(db)
  Sequel.extension :migration
  Sequel::Migrator.run(db, Pathname.new(__dir__) + 'migrations')
end