mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 19:55:16 +00:00
* Drop unused heartbeat lookup tables and their FK columns Remove 8 abandoned normalization tables (heartbeat_branches, heartbeat_categories, heartbeat_editors, heartbeat_languages, heartbeat_machines, heartbeat_operating_systems, heartbeat_projects, heartbeat_user_agents) and their corresponding foreign key columns from the heartbeats table. None had models, associations, or any application code referencing them. * Remove migrations cancelling each other out
22 lines
595 B
Ruby
22 lines
595 B
Ruby
class CreateFlipperTables < ActiveRecord::Migration[8.1]
|
|
def up
|
|
create_table :flipper_features do |t|
|
|
t.string :key, null: false
|
|
t.timestamps null: false
|
|
end
|
|
add_index :flipper_features, :key, unique: true
|
|
|
|
create_table :flipper_gates do |t|
|
|
t.string :feature_key, null: false
|
|
t.string :key, null: false
|
|
t.text :value
|
|
t.timestamps null: false
|
|
end
|
|
add_index :flipper_gates, [ :feature_key, :key, :value ], unique: true, length: { value: 255 }
|
|
end
|
|
|
|
def down
|
|
drop_table :flipper_gates
|
|
drop_table :flipper_features
|
|
end
|
|
end
|