Browse Source

Added bike_brands and bike_models sql data

-Update some migrations to match source schema, will need to add timestamps back eventually
denney-disable-on-select
Jason Denney 12 years ago
parent
commit
7bf4c4d601
  1. 2
      db/migrate/20121205040400_create_bike_brands.rb
  2. 4
      db/migrate/20121205040602_create_bike_models.rb
  3. 6
      db/seed/sql/bike_brands_and_models.sql

2
db/migrate/20121205040400_create_bike_brands.rb

@ -2,7 +2,7 @@ class CreateBikeBrands < ActiveRecord::Migration
def change
create_table :bike_brands do |t|
t.string "brand"
t.timestamps
#t.timestamps
end
end
end

4
db/migrate/20121205040602_create_bike_models.rb

@ -1,9 +1,9 @@
class CreateBikeModels < ActiveRecord::Migration
def change
create_table :bike_models do |t|
t.integer "bike_brand_id", :null => false
t.string "model", :null => false
t.timestamps
t.integer "bike_brand_id", :null => false
#t.timestamps
end
end
end

6
db/seed/sql/bike_brands_and_models.sql

@ -1,9 +1,10 @@
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
/**
CREATE TABLE bike_brands(
_id INTEGER PRIMARY KEY,
name varchar(255)
);
);*/
INSERT INTO "bike_brands" VALUES(1,'Phil Wood');
INSERT INTO "bike_brands" VALUES(2,'Mt. Shasta');
INSERT INTO "bike_brands" VALUES(3,'Moving Violations');
@ -490,11 +491,12 @@ INSERT INTO "bike_brands" VALUES(483,'Windy City');
INSERT INTO "bike_brands" VALUES(484,'Banshee');
INSERT INTO "bike_brands" VALUES(485,'Basso');
INSERT INTO "bike_brands" VALUES(486,'Gazelle Bikes');
/**
CREATE TABLE bike_models(
_id INTEGER PRIMARY KEY,
name varchar(255),
brand_id int
);
);*/
INSERT INTO "bike_models" VALUES(1,'Kiss Off',1);
INSERT INTO "bike_models" VALUES(2,'Kiss Off Julienne',1);
INSERT INTO "bike_models" VALUES(3,'Le Kiss Off',1);

Loading…
Cancel
Save