Class: TeleNotifyMigration
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- TeleNotifyMigration
- Defined in:
- lib/generators/tele_notify/migration/templates/active_record/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
15 16 17 |
# File 'lib/generators/tele_notify/migration/templates/active_record/migration.rb', line 15 def self.down drop_table :telegram_users end |
.up ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/generators/tele_notify/migration/templates/active_record/migration.rb', line 3 def self.up create_table :telegram_users do |t| t.integer :telegram_id t.string :first_name t.string :username t. end add_index :telegram_users, :telegram_id end |