Browse Source

lk | removes unused client tables and makes date sold a datetime to be consistent

master
Louis Knapp 8 years ago
parent
commit
f6a51e8a33
  1. 7
      db/migrate/20160731020409_remove_unused_columns_from_clients.rb
  2. 9
      db/migrate/20160731020658_change_bike_date_sold_column_to_date_time.rb
  3. 7
      db/schema.rb
  4. 4
      notes.md

7
db/migrate/20160731020409_remove_unused_columns_from_clients.rb

@ -0,0 +1,7 @@
class RemoveUnusedColumnsFromClients < ActiveRecord::Migration
def change
remove_column :clients, :number_of_calls
remove_column :clients, :application_date_bkp
remove_column :clients, :pickup_date_bkp
end
end

9
db/migrate/20160731020658_change_bike_date_sold_column_to_date_time.rb

@ -0,0 +1,9 @@
class ChangeBikeDateSoldColumnToDateTime < ActiveRecord::Migration
def up
change_column :bikes, :date_sold, :datetime
end
def down
change_column :bikes, :date_sold, :date
end
end

7
db/schema.rb

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160731014517) do
ActiveRecord::Schema.define(version: 20160731020658) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -43,7 +43,7 @@ ActiveRecord::Schema.define(version: 20160731014517) do
t.integer "log_number"
t.text "purpose"
t.text "mechanic"
t.date "date_sold"
t.datetime "date_sold"
t.integer "bike_index_id"
t.datetime "fixed_at"
end
@ -51,7 +51,6 @@ ActiveRecord::Schema.define(version: 20160731014517) do
create_table "clients", force: :cascade do |t|
t.string "first_name"
t.string "last_name"
t.date "application_date_bkp"
t.string "gender"
t.integer "age"
t.boolean "helmet"
@ -64,9 +63,7 @@ ActiveRecord::Schema.define(version: 20160731014517) do
t.integer "agency_id"
t.text "notes"
t.boolean "bike_fixed"
t.integer "number_of_calls"
t.boolean "application_voided"
t.date "pickup_date_bkp"
t.string "volunteer_at_pickup"
t.float "weight"
t.float "height"

4
notes.md

@ -13,10 +13,6 @@
- convert to bootstrap-less
- integrate with autocomplete to get manufacturers & models
- enable posting to bike index when a bike is created
- remove clients#number_of_calls
- remove clients#application_date_bkp
- remove clients#pickup_Date_bkp
- bike date_sold column should be datetime
- add tests to ensure that pages render
# Bugs

Loading…
Cancel
Save