Add instance info support
This commit is contained in:
parent
54f63a4be2
commit
d29b71bfd9
13 changed files with 181 additions and 16 deletions
14
db/migrate/20230804222017_create_instance_infoes.rb
Normal file
14
db/migrate/20230804222017_create_instance_infoes.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateInstanceInfoes < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :instance_infos do |t|
|
||||
t.string :domain, null: false, default: '', index: { unique: true }
|
||||
t.string :software, null: false, default: ''
|
||||
t.string :version, null: false, default: ''
|
||||
t.jsonb :data, null: false, default: {}
|
||||
t.datetime :created_at, null: false
|
||||
t.datetime :updated_at, null: false
|
||||
end
|
||||
end
|
||||
end
|
12
db/schema.rb
12
db/schema.rb
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_07_24_160715) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_08_04_222017) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
|
@ -631,6 +631,16 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_24_160715) do
|
|||
t.boolean "overwrite", default: false, null: false
|
||||
end
|
||||
|
||||
create_table "instance_infos", force: :cascade do |t|
|
||||
t.string "domain", default: "", null: false
|
||||
t.string "software", default: "", null: false
|
||||
t.string "version", default: "", null: false
|
||||
t.jsonb "data", default: {}, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["domain"], name: "index_instance_infos_on_domain", unique: true
|
||||
end
|
||||
|
||||
create_table "invites", force: :cascade do |t|
|
||||
t.bigint "user_id", null: false
|
||||
t.string "code", default: "", null: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue