class CreateDashCreatorCharts
Public Class Methods
down()
click to toggle source
# File lib/generators/dash_creator/install/templates/create_dash_creator_charts.rb, line 22 def self.down drop_table :dash_creator_charts end
Public Instance Methods
change()
click to toggle source
# File lib/generators/dash_creator/install/templates/create_dash_creator_charts.rb, line 2 def change if extension_enabled?('pgcrypto') && DashCreator.use_pgcrypto create_table :dash_creator_charts, id: :uuid, default: 'gen_random_uuid()' do |t| t.string :name t.jsonb :data t.uuid :user_id t.timestamps end else create_table :dash_creator_charts do |t| t.string :name t.jsonb :data t.id :user_id t.timestamps end end end