diff --git a/app/models/validation.rb b/app/models/validation.rb new file mode 100644 index 000000000..b50c7022b --- /dev/null +++ b/app/models/validation.rb @@ -0,0 +1,2 @@ +class Validation < ApplicationRecord +end \ No newline at end of file diff --git a/db/migrate/20240523153434_add_validations_table.rb b/db/migrate/20240523153434_add_validations_table.rb new file mode 100644 index 000000000..efe65a098 --- /dev/null +++ b/db/migrate/20240523153434_add_validations_table.rb @@ -0,0 +1,20 @@ +class AddValidationsTable < ActiveRecord::Migration[7.0] + def change + create_table :validations do |t| + t.column :log_type, :string + t.column :section, :string + t.column :validation_name, :string + t.column :description, :string + t.column :case, :string + t.column :field, :string + t.column :error_message, :string + t.column :from, :datetime + t.column :to, :datetime + t.column :validation_type, :string + t.column :hard_soft, :string + t.column :bulk_upload_specific, :boolean, default: false + t.column :other_validated_models, :string + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index ceeab8122..259d37297 100644 --- a/db/schema.rb +++ b/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_04_08_102550) do +ActiveRecord::Schema[7.0].define(version: 2024_05_23_153434) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -777,6 +777,24 @@ ActiveRecord::Schema[7.0].define(version: 2024_04_08_102550) do t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true end + create_table "validations", force: :cascade do |t| + t.string "log_type" + t.string "section" + t.string "validation_name" + t.string "description" + t.string "case" + t.string "field" + t.string "error_message" + t.datetime "from" + t.datetime "to" + t.string "validation_type" + t.string "hard_soft" + t.boolean "bulk_upload_specific", default: false + t.string "other_validated_models" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "versions", force: :cascade do |t| t.string "item_type", limit: 191, null: false t.bigint "item_id", null: false