This commit is contained in:
2026-06-12 15:40:12 -04:00
commit 521653e5de
53 changed files with 8635 additions and 0 deletions
@@ -0,0 +1,11 @@
class CreateLocalNetworks < ActiveRecord::Migration[7.2]
def change
create_table :local_networks do |t|
t.string :name
t.string :subnet
t.string :tld
t.timestamps
end
end
end
@@ -0,0 +1,14 @@
class CreateMachines < ActiveRecord::Migration[7.2]
def change
create_table :machines do |t|
t.string :name
t.string :domain
t.string :local_ip_octet
t.string :tailscale_ip
t.belongs_to :local_network
t.timestamps
end
end
end
@@ -0,0 +1,10 @@
class CreateServiceTypes < ActiveRecord::Migration[7.2]
def change
create_table :service_types do |t|
t.string :name
t.string :hex_color
t.timestamps
end
end
end
@@ -0,0 +1,16 @@
class CreateServices < ActiveRecord::Migration[7.2]
def change
create_table :services do |t|
t.string :name
t.string :subdomain
t.string :port
t.string :url_path
t.integer :position
t.belongs_to :machine
t.belongs_to :service_type
t.timestamps
end
end
end
+53
View File
@@ -0,0 +1,53 @@
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2026_05_27_212837) do
create_table "local_networks", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name"
t.string "subnet"
t.string "tld"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "machines", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name"
t.string "domain"
t.string "local_ip_octet"
t.string "tailscale_ip"
t.bigint "local_network_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["local_network_id"], name: "index_machines_on_local_network_id"
end
create_table "service_types", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name"
t.string "hex_color"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "services", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name"
t.string "subdomain"
t.string "port"
t.string "url_path"
t.integer "position"
t.bigint "machine_id"
t.bigint "service_type_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["machine_id"], name: "index_services_on_machine_id"
t.index ["service_type_id"], name: "index_services_on_service_type_id"
end
end