feat(ntfy): add ntfy fields to admin_users and ntfy_configured? method

This commit is contained in:
Min Zeya Phyo
2026-07-28 02:09:42 +08:00
parent 7c432941f1
commit 8f25dc057b
4 changed files with 63 additions and 5 deletions

View File

@@ -0,0 +1,8 @@
class AddNtfyFieldsToAdminUsers < ActiveRecord::Migration[8.0]
def change
add_column :admin_users, :ntfy_topic, :string
add_column :admin_users, :ntfy_token, :string
add_column :admin_users, :ntfy_enabled, :boolean, default: false, null: false
add_column :admin_users, :ntfy_server_url, :string
end
end

6
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_10_20_031401) do
ActiveRecord::Schema[8.0].define(version: 2026_07_27_180819) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
@@ -21,6 +21,10 @@ ActiveRecord::Schema[8.0].define(version: 2025_10_20_031401) do
t.datetime "last_login_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "ntfy_topic"
t.string "ntfy_token"
t.boolean "ntfy_enabled", default: false, null: false
t.string "ntfy_server_url"
t.index ["email"], name: "index_admin_users_on_email", unique: true
end