add path_rewrite model
This commit is contained in:
parent
a784b01ff1
commit
516205efd9
3 changed files with 24 additions and 1 deletions
4
app/models/path_rewrite.rb
Normal file
4
app/models/path_rewrite.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class PathRewrite < ApplicationRecord
|
||||
end
|
11
db/migrate/20240829141049_create_path_rewrites.rb
Normal file
11
db/migrate/20240829141049_create_path_rewrites.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class CreatePathRewrites < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :path_rewrites do |t|
|
||||
t.string :from, null: false
|
||||
t.string :to, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :path_rewrites, :from, unique: true
|
||||
end
|
||||
end
|
10
db/schema.rb
10
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: 2024_08_26_130121) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2024_08_29_141049) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_buffercache"
|
||||
enable_extension "pg_stat_statements"
|
||||
|
@ -858,6 +858,14 @@ ActiveRecord::Schema[7.0].define(version: 2024_08_26_130121) do
|
|||
t.index ["procedure_id"], name: "index_module_api_cartos_on_procedure_id", unique: true
|
||||
end
|
||||
|
||||
create_table "path_rewrites", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.string "from", null: false
|
||||
t.string "to", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["from"], name: "index_path_rewrites_on_from", unique: true
|
||||
end
|
||||
|
||||
create_table "procedure_presentations", id: :serial, force: :cascade do |t|
|
||||
t.integer "assign_to_id"
|
||||
t.datetime "created_at", precision: nil
|
||||
|
|
Loading…
Reference in a new issue