# frozen_string_literal: true class AddAdminToUsers < ActiveRecord::Migration[5.1] def up add_column :decidim_users, :admin, :boolean, null: false, default: false execute <<~SQL UPDATE decidim_users SET admin = true WHERE roles @> '{admin}' SQL end end