Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

846 B
Raw Blame
# frozen_string_literal: true

class CreateProjectLayer4Visions < ActiveRecord::Migration[8.0]
  def change
    create_table :project_layer4_visions, id: :uuid, default: -> { 'gen_random_uuid()' } do |t|
      t.references :organisation, type: :uuid, null: false, foreign_key: true
      t.references :project, type: :uuid, null: false, foreign_key: true, index: { unique: true }
      t.text :content, null: false
      t.column :content_embedding, 'vector(1536)'
      t.string :embedding_provider, null: false, default: 'openai'
      t.string :embedding_model, null: false, default: 'text-embedding-ada-002'
      t.boolean :auto_generated, null: false, default: true
      t.references :edited_by_user, type: :uuid, foreign_key: { to_table: :users }
      t.string :language, null: false, default: 'en'

      t.timestamps
    end
  end
end