# 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.0].define(version: 2024_03_01_112046) do
  create_table "artists", force: :cascade do |t|
    t.string "name"
    t.string "lastname"
    t.string "slug"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "artists_collections", id: false, force: :cascade do |t|
    t.integer "artist_id", null: false
    t.integer "collection_id", null: false
  end

  create_table "collections", force: :cascade do |t|
    t.string "name"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "friendly_id_slugs", force: :cascade do |t|
    t.string "slug", null: false
    t.integer "sluggable_id", null: false
    t.string "sluggable_type", limit: 50
    t.string "scope"
    t.datetime "created_at"
    t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
    t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
    t.index ["sluggable_type", "sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_type_and_sluggable_id"
  end

  create_table "grabados", force: :cascade do |t|
    t.string "name"
    t.string "style_es"
    t.string "style_en"
    t.integer "paperw"
    t.integer "paperh"
    t.integer "platew"
    t.integer "plateh"
    t.integer "year"
    t.string "state"
    t.integer "price"
    t.string "edition"
    t.string "image"
    t.integer "code"
    t.integer "artist_id", null: false
    t.integer "collection_id", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["artist_id"], name: "index_grabados_on_artist_id"
    t.index ["collection_id"], name: "index_grabados_on_collection_id"
  end

  add_foreign_key "grabados", "artists"
  add_foreign_key "grabados", "collections"
end
