Fixes
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
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.integer :kms
|
||||
|
@ -1,6 +1,7 @@
|
||||
class CreateEntregas < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :entregas do |t|
|
||||
t.belongs_to :viaje
|
||||
t.string :nombre_recibe # Quien recibe
|
||||
t.text :carga # Detalles de la carga, serializado
|
||||
t.timestamps
|
||||
|
@ -1,6 +1,7 @@
|
||||
class CreateRetiros < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :retiros do |t|
|
||||
t.belongs_to :viaje
|
||||
t.string :nombre_entrega # Quien entrega
|
||||
t.text :carga # Detalles de la carga, serializado
|
||||
t.timestamps
|
||||
|
6
db/schema.rb
generated
6
db/schema.rb
generated
@ -12,17 +12,21 @@
|
||||
|
||||
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.bigint "viaje_id"
|
||||
t.string "nombre_recibe"
|
||||
t.text "carga"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["viaje_id"], name: "index_entregas_on_viaje_id"
|
||||
end
|
||||
|
||||
create_table "retiros", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
|
||||
t.bigint "viaje_id"
|
||||
t.string "nombre_entrega"
|
||||
t.text "carga"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["viaje_id"], name: "index_retiros_on_viaje_id"
|
||||
end
|
||||
|
||||
create_table "ruta", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
|
||||
@ -31,10 +35,12 @@ ActiveRecord::Schema[7.2].define(version: 2024_09_11_233430) do
|
||||
end
|
||||
|
||||
create_table "viajes", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
|
||||
t.bigint "ruta_id"
|
||||
t.string "direccion_partida"
|
||||
t.string "direccion_llegada"
|
||||
t.integer "kms"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["ruta_id"], name: "index_viajes_on_ruta_id"
|
||||
end
|
||||
end
|
||||
|
@ -10,6 +10,6 @@ class RutaTest < ActiveSupport::TestCase
|
||||
|
||||
test "get" do
|
||||
ruta = Ruta.find(1)
|
||||
assert Ruta.id === 1
|
||||
assert ruta.id === 1
|
||||
end
|
||||
end
|
||||
|
@ -11,5 +11,11 @@ module ActiveSupport
|
||||
fixtures :all
|
||||
|
||||
# Add more helper methods to be used by all tests here...
|
||||
def ruta_get_url
|
||||
"/ruta"
|
||||
end
|
||||
def ruta_add_url
|
||||
"/ruta"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user