Class: VisitorMigration

Inherits:
Object
  • Object
show all
Defined in:
lib/chatgpt_assistant/migrations.rb

Overview

Visitor model

Instance Method Summary collapse

Instance Method Details

#changeObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/chatgpt_assistant/migrations.rb', line 8

def change
  return if ActiveRecord::Base.connection.table_exists? :visitors

  create_table :visitors do |t|
    t.string :telegram_id, limit: 100
    t.string :discord_id, limit: 100
    t.integer :platform, null: false, default: 0
    t.string :name, null: false
    t.integer :current_user_id, default: 0
    t.timestamps
  end
end