Init dump

This commit is contained in:
Jason Jordan
2025-11-24 08:22:44 -05:00
parent d48bb96791
commit 3fbece7da6
73 changed files with 1747 additions and 121 deletions
@@ -1,10 +0,0 @@
class CreateArticles < ActiveRecord::Migration[7.0]
def change
create_table :articles do |t|
t.string :title
t.text :content
t.timestamps
end
end
end
@@ -1,10 +0,0 @@
class CreateComments < ActiveRecord::Migration[7.0]
def change
create_table :comments do |t|
t.references :article, null: false, foreign_key: true
t.text :content
t.timestamps
end
end
end
@@ -0,0 +1,9 @@
class CreateIdCardBenefitsTemplates < ActiveRecord::Migration[7.2]
def change
create_table :id_card_benefits_templates do |t|
t.string :title
t.timestamps
end
end
end
@@ -0,0 +1,12 @@
class CreateIdCardBenefits < ActiveRecord::Migration[7.2]
def change
create_table :id_card_benefits do |t|
t.string :benefit_desc
t.string :benefit
t.integer :sequence
t.references :id_card_benefits_template, null: false, foreign_key: true
t.timestamps
end
end
end
+10 -12
View File
@@ -10,10 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2023_03_26_154219) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
ActiveRecord::Schema[7.2].define(version: 2025_11_04_171752) do
create_table "action_text_rich_texts", force: :cascade do |t|
t.string "name", null: false
t.text "body"
@@ -52,22 +49,23 @@ ActiveRecord::Schema[7.1].define(version: 2023_03_26_154219) do
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
end
create_table "articles", force: :cascade do |t|
t.string "title"
t.text "content"
create_table "id_card_benefits", force: :cascade do |t|
t.string "benefit_desc"
t.string "benefit"
t.integer "sequence"
t.bigint "id_card_benefits_template_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["id_card_benefits_template_id"], name: "index_id_card_benefits_on_id_card_benefits_template_id"
end
create_table "comments", force: :cascade do |t|
t.bigint "article_id", null: false
t.text "content"
create_table "id_card_benefits_templates", force: :cascade do |t|
t.string "title"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["article_id"], name: "index_comments_on_article_id"
end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "comments", "articles"
add_foreign_key "id_card_benefits", "id_card_benefits_templates"
end
+9
View File
@@ -9,3 +9,12 @@
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
# MovieGenre.find_or_create_by!(name: genre_name)
# end
# Pull one planid, return data, run this
# data.each do |bene|
# IdCardBenefit.create(
# benefit_desc: bene.benefit_desc,
# sequence: bene.sequence,
# id_card_benefits_template: temp
# )
# end