Pruebas
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
class CreateRuta < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :ruta do |t|
|
||||
t.has_many :viajes
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
@ -1,12 +1,9 @@
|
||||
class CreateViajes < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :viajes do |t|
|
||||
t.belongs_to :ruta
|
||||
t.string :direccion_partida
|
||||
t.string :direccion_llegada
|
||||
t.int :kms
|
||||
t.has_many :entregas
|
||||
t.has_many :retiros
|
||||
t.integer :kms
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
@ -1,9 +1,8 @@
|
||||
class CreateEntregas < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :entregas do |t|
|
||||
t.belongs_to :viaje
|
||||
t.string :nombre_recibe # Quien recibe
|
||||
t.string :carga # Detalles de la carga, serializado
|
||||
t.text :carga # Detalles de la carga, serializado
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
@ -1,9 +1,8 @@
|
||||
class CreateRetiros < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :retiros do |t|
|
||||
t.belongs_to :viaje
|
||||
t.string :nombre_entrega # Quien entrega
|
||||
t.string :carga # Detalles de la carga, serializado
|
||||
t.text :carga # Detalles de la carga, serializado
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
40
db/schema.rb
generated
Normal file
40
db/schema.rb
generated
Normal file
@ -0,0 +1,40 @@
|
||||
# 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.2].define(version: 2024_09_11_233430) do
|
||||
create_table "entregas", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
|
||||
t.string "nombre_recibe"
|
||||
t.text "carga"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "retiros", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
|
||||
t.string "nombre_entrega"
|
||||
t.text "carga"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "ruta", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "viajes", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
|
||||
t.string "direccion_partida"
|
||||
t.string "direccion_llegada"
|
||||
t.integer "kms"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user