Permette titolo, testo e link diversi per Android e iOS negli avvisi.
Separa i canali app e mostra il nodo ingest nelle sessioni admin. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
class SplitAnnouncementAppPlatforms < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :app_announcements, :show_on_android, :boolean, null: false, default: true
|
||||
add_column :app_announcements, :show_on_ios, :boolean, null: false, default: true
|
||||
add_column :app_announcements, :android_title, :string
|
||||
add_column :app_announcements, :android_body, :text
|
||||
add_column :app_announcements, :android_action_url, :string
|
||||
add_column :app_announcements, :android_action_label, :string
|
||||
add_column :app_announcements, :ios_title, :string
|
||||
add_column :app_announcements, :ios_body, :text
|
||||
add_column :app_announcements, :ios_action_url, :string
|
||||
add_column :app_announcements, :ios_action_label, :string
|
||||
|
||||
reversible do |dir|
|
||||
dir.up do
|
||||
execute <<~SQL.squish
|
||||
UPDATE app_announcements
|
||||
SET show_on_android = show_on_app,
|
||||
show_on_ios = show_on_app
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
||||
remove_column :app_announcements, :show_on_app, :boolean, null: false, default: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user