2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/generators/dash_creator/install/templates/create_dash_creator_filters.rb', line 2
def change
if extension_enabled?('pgcrypto') && DashCreator.use_pgcrypto
create_table :dash_creator_filters, id: :uuid, default: 'gen_random_uuid()' do |t|
t.string :name
t.jsonb :options, default: {}
t.uuid :user_id
t.timestamps
end
else
create_table :dash_creator_filters do |t|
t.string :name
t.jsonb :options, default: {}
t.id :user_id
t.timestamps
end
end
end
|