lore link field models

This commit is contained in:
Andrew Brown 2020-03-25 14:46:31 -05:00
parent e020ae1a2d
commit 7f07220013
114 changed files with 1340 additions and 6 deletions

View File

@ -0,0 +1,4 @@
class LoreBeliever < ApplicationRecord
belongs_to :lore
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreBuilding < ApplicationRecord
belongs_to :lore
belongs_to :buildsing
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreCharacter < ApplicationRecord
belongs_to :lore
belongs_to :character
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreCondition < ApplicationRecord
belongs_to :lore
belongs_to :condition
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreContinent < ApplicationRecord
belongs_to :lore
belongs_to :continent
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreCountry < ApplicationRecord
belongs_to :lore
belongs_to :country
belongs_to :user
end

View File

@ -0,0 +1,4 @@
class LoreCreatedTradition < ApplicationRecord
belongs_to :lore
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreCreature < ApplicationRecord
belongs_to :lore
belongs_to :creature
belongs_to :user
end

5
app/models/lore_deity.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreDeity < ApplicationRecord
belongs_to :lore
belongs_to :deity
belongs_to :user
end

5
app/models/lore_flora.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreFlora < ApplicationRecord
belongs_to :lore
belongs_to :flora
belongs_to :user
end

5
app/models/lore_food.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreFood < ApplicationRecord
belongs_to :lore
belongs_to :food
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreGovernment < ApplicationRecord
belongs_to :lore
belongs_to :government
belongs_to :user
end

5
app/models/lore_group.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreGroup < ApplicationRecord
belongs_to :lore
belongs_to :group
belongs_to :user
end

5
app/models/lore_job.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreJob < ApplicationRecord
belongs_to :lore
belongs_to :job
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreLandmark < ApplicationRecord
belongs_to :lore
belongs_to :landmark
belongs_to :user
end

5
app/models/lore_magic.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreMagic < ApplicationRecord
belongs_to :lore
belongs_to :magic
belongs_to :user
end

View File

@ -0,0 +1,4 @@
class LoreOriginalLanguage < ApplicationRecord
belongs_to :lore
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LorePlanet < ApplicationRecord
belongs_to :lore
belongs_to :planet
belongs_to :user
end

5
app/models/lore_race.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreRace < ApplicationRecord
belongs_to :lore
belongs_to :race
belongs_to :user
end

View File

@ -0,0 +1,4 @@
class LoreRelatedLore < ApplicationRecord
belongs_to :lore
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreReligion < ApplicationRecord
belongs_to :lore
belongs_to :religion
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreSchool < ApplicationRecord
belongs_to :lore
belongs_to :school
belongs_to :user
end

5
app/models/lore_sport.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreSport < ApplicationRecord
belongs_to :lore
belongs_to :sport
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreTechnology < ApplicationRecord
belongs_to :lore
belongs_to :technology
belongs_to :user
end

5
app/models/lore_town.rb Normal file
View File

@ -0,0 +1,5 @@
class LoreTown < ApplicationRecord
belongs_to :lore
belongs_to :town
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreTradition < ApplicationRecord
belongs_to :lore
belongs_to :tradition
belongs_to :user
end

View File

@ -0,0 +1,4 @@
class LoreVariation < ApplicationRecord
belongs_to :lore
belongs_to :user
end

View File

@ -0,0 +1,5 @@
class LoreVehicle < ApplicationRecord
belongs_to :lore
belongs_to :vehicle
belongs_to :user
end

View File

@ -0,0 +1,11 @@
class CreateLorePlanets < ActiveRecord::Migration[6.0]
def change
create_table :lore_planets do |t|
t.references :lore, null: false, foreign_key: true
t.references :planet, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreContinents < ActiveRecord::Migration[6.0]
def change
create_table :lore_continents do |t|
t.references :lore, null: false, foreign_key: true
t.references :continent, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreCountries < ActiveRecord::Migration[6.0]
def change
create_table :lore_countries do |t|
t.references :lore, null: false, foreign_key: true
t.references :country, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreLandmarks < ActiveRecord::Migration[6.0]
def change
create_table :lore_landmarks do |t|
t.references :lore, null: false, foreign_key: true
t.references :landmark, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreTowns < ActiveRecord::Migration[6.0]
def change
create_table :lore_towns do |t|
t.references :lore, null: false, foreign_key: true
t.references :town, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreBuildings < ActiveRecord::Migration[6.0]
def change
create_table :lore_buildings do |t|
t.references :lore, null: false, foreign_key: true
t.references :building, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreSchools < ActiveRecord::Migration[6.0]
def change
create_table :lore_schools do |t|
t.references :lore, null: false, foreign_key: true
t.references :school, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreCharacters < ActiveRecord::Migration[6.0]
def change
create_table :lore_characters do |t|
t.references :lore, null: false, foreign_key: true
t.references :character, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreDeities < ActiveRecord::Migration[6.0]
def change
create_table :lore_deities do |t|
t.references :lore, null: false, foreign_key: true
t.references :deity, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreCreatures < ActiveRecord::Migration[6.0]
def change
create_table :lore_creatures do |t|
t.references :lore, null: false, foreign_key: true
t.references :creature, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreFloras < ActiveRecord::Migration[6.0]
def change
create_table :lore_floras do |t|
t.references :lore, null: false, foreign_key: true
t.references :flora, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreJobs < ActiveRecord::Migration[6.0]
def change
create_table :lore_jobs do |t|
t.references :lore, null: false, foreign_key: true
t.references :job, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreTechnologies < ActiveRecord::Migration[6.0]
def change
create_table :lore_technologies do |t|
t.references :lore, null: false, foreign_key: true
t.references :technology, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreVehicles < ActiveRecord::Migration[6.0]
def change
create_table :lore_vehicles do |t|
t.references :lore, null: false, foreign_key: true
t.references :vehicle, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreConditions < ActiveRecord::Migration[6.0]
def change
create_table :lore_conditions do |t|
t.references :lore, null: false, foreign_key: true
t.references :condition, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreRaces < ActiveRecord::Migration[6.0]
def change
create_table :lore_races do |t|
t.references :lore, null: false, foreign_key: true
t.references :race, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreReligions < ActiveRecord::Migration[6.0]
def change
create_table :lore_religions do |t|
t.references :lore, null: false, foreign_key: true
t.references :religion, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreMagics < ActiveRecord::Migration[6.0]
def change
create_table :lore_magics do |t|
t.references :lore, null: false, foreign_key: true
t.references :magic, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreGovernments < ActiveRecord::Migration[6.0]
def change
create_table :lore_governments do |t|
t.references :lore, null: false, foreign_key: true
t.references :government, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreGroups < ActiveRecord::Migration[6.0]
def change
create_table :lore_groups do |t|
t.references :lore, null: false, foreign_key: true
t.references :group, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreTraditions < ActiveRecord::Migration[6.0]
def change
create_table :lore_traditions do |t|
t.references :lore, null: false, foreign_key: true
t.references :tradition, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreFoods < ActiveRecord::Migration[6.0]
def change
create_table :lore_foods do |t|
t.references :lore, null: false, foreign_key: true
t.references :food, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreSports < ActiveRecord::Migration[6.0]
def change
create_table :lore_sports do |t|
t.references :lore, null: false, foreign_key: true
t.references :sport, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreBelievers < ActiveRecord::Migration[6.0]
def change
create_table :lore_believers do |t|
t.references :lore, null: false, foreign_key: true
t.integer :believer_id
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreCreatedTraditions < ActiveRecord::Migration[6.0]
def change
create_table :lore_created_traditions do |t|
t.references :lore, null: false, foreign_key: true
t.integer :created_tradition_id
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreOriginalLanguages < ActiveRecord::Migration[6.0]
def change
create_table :lore_original_languages do |t|
t.references :lore, null: false, foreign_key: true
t.integer :original_language_id
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreVariations < ActiveRecord::Migration[6.0]
def change
create_table :lore_variations do |t|
t.references :lore, null: false, foreign_key: true
t.integer :variation_id
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateLoreRelatedLores < ActiveRecord::Migration[6.0]
def change
create_table :lore_related_lores do |t|
t.references :lore, null: false, foreign_key: true
t.integer :related_lore_id
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -10,7 +10,8 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_03_25_171712) do
ActiveRecord::Schema.define(version: 2020_03_25_193619) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@ -1058,6 +1059,11 @@ ActiveRecord::Schema.define(version: 2020_03_25_171712) do
t.integer "universe_id"
t.boolean "favorite"
t.text "notes_text"
t.string "subtitle"
t.string "format"
t.string "genre"
t.integer "word_count"
t.string "status"
t.index ["universe_id", "deleted_at"], name: "index_documents_on_universe_id_and_deleted_at"
t.index ["universe_id"], name: "index_documents_on_universe_id"
t.index ["user_id"], name: "index_documents_on_user_id"
@ -1395,7 +1401,7 @@ ActiveRecord::Schema.define(version: 2020_03_25_171712) do
t.datetime "updated_at", null: false
t.string "src_file_name"
t.string "src_content_type"
t.integer "src_file_size"
t.bigint "src_file_size"
t.datetime "src_updated_at"
t.index ["content_type", "content_id"], name: "index_image_uploads_on_content_type_and_content_id"
t.index ["user_id"], name: "index_image_uploads_on_user_id"
@ -1694,6 +1700,309 @@ ActiveRecord::Schema.define(version: 2020_03_25_171712) do
t.index ["user_id"], name: "index_locations_on_user_id"
end
create_table "lore_believers", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "believer_id"
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_believers_on_lore_id"
t.index ["user_id"], name: "index_lore_believers_on_user_id"
end
create_table "lore_buildings", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "building_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["building_id"], name: "index_lore_buildings_on_building_id"
t.index ["lore_id"], name: "index_lore_buildings_on_lore_id"
t.index ["user_id"], name: "index_lore_buildings_on_user_id"
end
create_table "lore_characters", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "character_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["character_id"], name: "index_lore_characters_on_character_id"
t.index ["lore_id"], name: "index_lore_characters_on_lore_id"
t.index ["user_id"], name: "index_lore_characters_on_user_id"
end
create_table "lore_conditions", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "condition_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["condition_id"], name: "index_lore_conditions_on_condition_id"
t.index ["lore_id"], name: "index_lore_conditions_on_lore_id"
t.index ["user_id"], name: "index_lore_conditions_on_user_id"
end
create_table "lore_continents", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "continent_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["continent_id"], name: "index_lore_continents_on_continent_id"
t.index ["lore_id"], name: "index_lore_continents_on_lore_id"
t.index ["user_id"], name: "index_lore_continents_on_user_id"
end
create_table "lore_countries", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "country_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["country_id"], name: "index_lore_countries_on_country_id"
t.index ["lore_id"], name: "index_lore_countries_on_lore_id"
t.index ["user_id"], name: "index_lore_countries_on_user_id"
end
create_table "lore_created_traditions", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "created_tradition_id"
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_created_traditions_on_lore_id"
t.index ["user_id"], name: "index_lore_created_traditions_on_user_id"
end
create_table "lore_creatures", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "creature_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["creature_id"], name: "index_lore_creatures_on_creature_id"
t.index ["lore_id"], name: "index_lore_creatures_on_lore_id"
t.index ["user_id"], name: "index_lore_creatures_on_user_id"
end
create_table "lore_deities", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "deity_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["deity_id"], name: "index_lore_deities_on_deity_id"
t.index ["lore_id"], name: "index_lore_deities_on_lore_id"
t.index ["user_id"], name: "index_lore_deities_on_user_id"
end
create_table "lore_floras", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "flora_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["flora_id"], name: "index_lore_floras_on_flora_id"
t.index ["lore_id"], name: "index_lore_floras_on_lore_id"
t.index ["user_id"], name: "index_lore_floras_on_user_id"
end
create_table "lore_foods", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "food_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["food_id"], name: "index_lore_foods_on_food_id"
t.index ["lore_id"], name: "index_lore_foods_on_lore_id"
t.index ["user_id"], name: "index_lore_foods_on_user_id"
end
create_table "lore_governments", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "government_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["government_id"], name: "index_lore_governments_on_government_id"
t.index ["lore_id"], name: "index_lore_governments_on_lore_id"
t.index ["user_id"], name: "index_lore_governments_on_user_id"
end
create_table "lore_groups", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "group_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["group_id"], name: "index_lore_groups_on_group_id"
t.index ["lore_id"], name: "index_lore_groups_on_lore_id"
t.index ["user_id"], name: "index_lore_groups_on_user_id"
end
create_table "lore_jobs", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "job_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["job_id"], name: "index_lore_jobs_on_job_id"
t.index ["lore_id"], name: "index_lore_jobs_on_lore_id"
t.index ["user_id"], name: "index_lore_jobs_on_user_id"
end
create_table "lore_landmarks", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "landmark_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["landmark_id"], name: "index_lore_landmarks_on_landmark_id"
t.index ["lore_id"], name: "index_lore_landmarks_on_lore_id"
t.index ["user_id"], name: "index_lore_landmarks_on_user_id"
end
create_table "lore_magics", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "magic_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_magics_on_lore_id"
t.index ["magic_id"], name: "index_lore_magics_on_magic_id"
t.index ["user_id"], name: "index_lore_magics_on_user_id"
end
create_table "lore_original_languages", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "original_language_id"
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_original_languages_on_lore_id"
t.index ["user_id"], name: "index_lore_original_languages_on_user_id"
end
create_table "lore_planets", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "planet_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_planets_on_lore_id"
t.index ["planet_id"], name: "index_lore_planets_on_planet_id"
t.index ["user_id"], name: "index_lore_planets_on_user_id"
end
create_table "lore_races", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "race_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_races_on_lore_id"
t.index ["race_id"], name: "index_lore_races_on_race_id"
t.index ["user_id"], name: "index_lore_races_on_user_id"
end
create_table "lore_related_lores", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "related_lore_id"
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_related_lores_on_lore_id"
t.index ["user_id"], name: "index_lore_related_lores_on_user_id"
end
create_table "lore_religions", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "religion_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_religions_on_lore_id"
t.index ["religion_id"], name: "index_lore_religions_on_religion_id"
t.index ["user_id"], name: "index_lore_religions_on_user_id"
end
create_table "lore_schools", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "school_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_schools_on_lore_id"
t.index ["school_id"], name: "index_lore_schools_on_school_id"
t.index ["user_id"], name: "index_lore_schools_on_user_id"
end
create_table "lore_sports", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "sport_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_sports_on_lore_id"
t.index ["sport_id"], name: "index_lore_sports_on_sport_id"
t.index ["user_id"], name: "index_lore_sports_on_user_id"
end
create_table "lore_technologies", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "technology_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_technologies_on_lore_id"
t.index ["technology_id"], name: "index_lore_technologies_on_technology_id"
t.index ["user_id"], name: "index_lore_technologies_on_user_id"
end
create_table "lore_towns", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "town_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_towns_on_lore_id"
t.index ["town_id"], name: "index_lore_towns_on_town_id"
t.index ["user_id"], name: "index_lore_towns_on_user_id"
end
create_table "lore_traditions", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "tradition_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_traditions_on_lore_id"
t.index ["tradition_id"], name: "index_lore_traditions_on_tradition_id"
t.index ["user_id"], name: "index_lore_traditions_on_user_id"
end
create_table "lore_variations", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "variation_id"
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_variations_on_lore_id"
t.index ["user_id"], name: "index_lore_variations_on_user_id"
end
create_table "lore_vehicles", force: :cascade do |t|
t.integer "lore_id", null: false
t.integer "vehicle_id", null: false
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["lore_id"], name: "index_lore_vehicles_on_lore_id"
t.index ["user_id"], name: "index_lore_vehicles_on_user_id"
t.index ["vehicle_id"], name: "index_lore_vehicles_on_vehicle_id"
end
create_table "lores", force: :cascade do |t|
t.string "name"
t.integer "user_id", null: false
@ -2935,9 +3244,6 @@ ActiveRecord::Schema.define(version: 2020_03_25_171712) do
t.integer "habitat_id"
end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "api_keys", "users"
add_foreign_key "application_integrations", "users"
add_foreign_key "buildings", "universes"
add_foreign_key "buildings", "users"
add_foreign_key "character_birthtowns", "characters"
@ -3111,6 +3417,85 @@ ActiveRecord::Schema.define(version: 2020_03_25_171712) do
add_foreign_key "location_largest_towns", "users"
add_foreign_key "location_notable_towns", "locations"
add_foreign_key "location_notable_towns", "users"
add_foreign_key "lore_believers", "lores"
add_foreign_key "lore_believers", "users"
add_foreign_key "lore_buildings", "buildings"
add_foreign_key "lore_buildings", "lores"
add_foreign_key "lore_buildings", "users"
add_foreign_key "lore_characters", "characters"
add_foreign_key "lore_characters", "lores"
add_foreign_key "lore_characters", "users"
add_foreign_key "lore_conditions", "conditions"
add_foreign_key "lore_conditions", "lores"
add_foreign_key "lore_conditions", "users"
add_foreign_key "lore_continents", "continents"
add_foreign_key "lore_continents", "lores"
add_foreign_key "lore_continents", "users"
add_foreign_key "lore_countries", "countries"
add_foreign_key "lore_countries", "lores"
add_foreign_key "lore_countries", "users"
add_foreign_key "lore_created_traditions", "lores"
add_foreign_key "lore_created_traditions", "users"
add_foreign_key "lore_creatures", "creatures"
add_foreign_key "lore_creatures", "lores"
add_foreign_key "lore_creatures", "users"
add_foreign_key "lore_deities", "deities"
add_foreign_key "lore_deities", "lores"
add_foreign_key "lore_deities", "users"
add_foreign_key "lore_floras", "floras"
add_foreign_key "lore_floras", "lores"
add_foreign_key "lore_floras", "users"
add_foreign_key "lore_foods", "foods"
add_foreign_key "lore_foods", "lores"
add_foreign_key "lore_foods", "users"
add_foreign_key "lore_governments", "governments"
add_foreign_key "lore_governments", "lores"
add_foreign_key "lore_governments", "users"
add_foreign_key "lore_groups", "groups"
add_foreign_key "lore_groups", "lores"
add_foreign_key "lore_groups", "users"
add_foreign_key "lore_jobs", "jobs"
add_foreign_key "lore_jobs", "lores"
add_foreign_key "lore_jobs", "users"
add_foreign_key "lore_landmarks", "landmarks"
add_foreign_key "lore_landmarks", "lores"
add_foreign_key "lore_landmarks", "users"
add_foreign_key "lore_magics", "lores"
add_foreign_key "lore_magics", "magics"
add_foreign_key "lore_magics", "users"
add_foreign_key "lore_original_languages", "lores"
add_foreign_key "lore_original_languages", "users"
add_foreign_key "lore_planets", "lores"
add_foreign_key "lore_planets", "planets"
add_foreign_key "lore_planets", "users"
add_foreign_key "lore_races", "lores"
add_foreign_key "lore_races", "races"
add_foreign_key "lore_races", "users"
add_foreign_key "lore_related_lores", "lores"
add_foreign_key "lore_related_lores", "users"
add_foreign_key "lore_religions", "lores"
add_foreign_key "lore_religions", "religions"
add_foreign_key "lore_religions", "users"
add_foreign_key "lore_schools", "lores"
add_foreign_key "lore_schools", "schools"
add_foreign_key "lore_schools", "users"
add_foreign_key "lore_sports", "lores"
add_foreign_key "lore_sports", "sports"
add_foreign_key "lore_sports", "users"
add_foreign_key "lore_technologies", "lores"
add_foreign_key "lore_technologies", "technologies"
add_foreign_key "lore_technologies", "users"
add_foreign_key "lore_towns", "lores"
add_foreign_key "lore_towns", "towns"
add_foreign_key "lore_towns", "users"
add_foreign_key "lore_traditions", "lores"
add_foreign_key "lore_traditions", "traditions"
add_foreign_key "lore_traditions", "users"
add_foreign_key "lore_variations", "lores"
add_foreign_key "lore_variations", "users"
add_foreign_key "lore_vehicles", "lores"
add_foreign_key "lore_vehicles", "users"
add_foreign_key "lore_vehicles", "vehicles"
add_foreign_key "lores", "universes"
add_foreign_key "lores", "users"
add_foreign_key "notice_dismissals", "users"

View File

@ -23,8 +23,10 @@ Checklist to create a new content type:
- Customize categories/fields in config/attributes/continent.yml
- Add links (for each link, do the following)
- If using a non-table-name for the relating model (e.g. popular_food instead of food), use :integer instead of :references
- If using a non-table-name for the relating model (e.g. popular_food instead of food), use *_id and :integer instead of :references
- rails g model ContinentLandmark continent:references landmark:references user:references
- rake db:migrate
- add relations to Continent model
- relates :landmarks, with: :continent_landmarks
- add optional: true on all belongs_to :user
- Move all link models into models/page_groupers

11
test/fixtures/lore_believers.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
believer_id: 1
user: one
two:
lore: two
believer_id: 1
user: two

11
test/fixtures/lore_buildings.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
buildsing: one
user: one
two:
lore: two
buildsing: two
user: two

11
test/fixtures/lore_characters.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
character: one
user: one
two:
lore: two
character: two
user: two

11
test/fixtures/lore_conditions.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
condition: one
user: one
two:
lore: two
condition: two
user: two

11
test/fixtures/lore_continents.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
continent: one
user: one
two:
lore: two
continent: two
user: two

11
test/fixtures/lore_countries.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
country: one
user: one
two:
lore: two
country: two
user: two

View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
created_tradition_id: 1
user: one
two:
lore: two
created_tradition_id: 1
user: two

11
test/fixtures/lore_creatures.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
creature: one
user: one
two:
lore: two
creature: two
user: two

11
test/fixtures/lore_deities.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
deity: one
user: one
two:
lore: two
deity: two
user: two

11
test/fixtures/lore_floras.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
flora: one
user: one
two:
lore: two
flora: two
user: two

11
test/fixtures/lore_foods.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
food: one
user: one
two:
lore: two
food: two
user: two

11
test/fixtures/lore_governments.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
government: one
user: one
two:
lore: two
government: two
user: two

11
test/fixtures/lore_groups.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
group: one
user: one
two:
lore: two
group: two
user: two

11
test/fixtures/lore_jobs.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
job: one
user: one
two:
lore: two
job: two
user: two

11
test/fixtures/lore_landmarks.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
landmark: one
user: one
two:
lore: two
landmark: two
user: two

11
test/fixtures/lore_magics.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
magic: one
user: one
two:
lore: two
magic: two
user: two

View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
original_language_id: 1
user: one
two:
lore: two
original_language_id: 1
user: two

11
test/fixtures/lore_planets.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
planet: one
user: one
two:
lore: two
planet: two
user: two

11
test/fixtures/lore_races.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
race: one
user: one
two:
lore: two
race: two
user: two

11
test/fixtures/lore_related_lores.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
related_lore_id: 1
user: one
two:
lore: two
related_lore_id: 1
user: two

11
test/fixtures/lore_religions.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
religion: one
user: one
two:
lore: two
religion: two
user: two

11
test/fixtures/lore_schools.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
school: one
user: one
two:
lore: two
school: two
user: two

11
test/fixtures/lore_sports.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
sport: one
user: one
two:
lore: two
sport: two
user: two

11
test/fixtures/lore_technologies.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
technology: one
user: one
two:
lore: two
technology: two
user: two

11
test/fixtures/lore_towns.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
town: one
user: one
two:
lore: two
town: two
user: two

11
test/fixtures/lore_traditions.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
tradition: one
user: one
two:
lore: two
tradition: two
user: two

11
test/fixtures/lore_variations.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
variation_id: 1
user: one
two:
lore: two
variation_id: 1
user: two

11
test/fixtures/lore_vehicles.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
lore: one
vehicle: one
user: one
two:
lore: two
vehicle: two
user: two

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreBelieverTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreBuildingTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreCharacterTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreConditionTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreContinentTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreCountryTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreCreatedTraditionTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreCreatureTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreDeityTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreFloraTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreFoodTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreGovernmentTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreGroupTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class LoreJobTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

Some files were not shown because too many files have changed in this diff Show More