mlb 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/db/cleanup.sql +55 -0
  3. data/db/mlb.sqlite3 +0 -0
  4. data/mlb.gemspec +2 -1
  5. metadata +2 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
data/db/cleanup.sql ADDED
@@ -0,0 +1,55 @@
1
+ DROP TABLE "drafts";
2
+
3
+ BEGIN TRANSACTION;
4
+ CREATE TABLE "leagues_new" (
5
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
6
+ "name" VARCHAR(50) NOT NULL);
7
+ INSERT INTO "leagues_new" SELECT "id", "name" FROM "leagues";
8
+ DROP TABLE "leagues";
9
+ ALTER TABLE "leagues_new" RENAME TO "leagues";
10
+ COMMIT;
11
+
12
+ BEGIN TRANSACTION;
13
+ CREATE TABLE "divisions_new" (
14
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
15
+ "league_id" INTEGER NOT NULL,
16
+ "name" VARCHAR(50) NOT NULL);
17
+ INSERT INTO "divisions_new" SELECT "id", "league_id", "name" FROM "divisions";
18
+ DROP TABLE "divisions";
19
+ ALTER TABLE "divisions_new" RENAME TO "divisions";
20
+ CREATE INDEX "index_divisions_league_id" ON "divisions" ("league_id");
21
+ COMMIT;
22
+
23
+ BEGIN TRANSACTION;
24
+ CREATE TABLE "players_new" (
25
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
26
+ "team_id" INTEGER,
27
+ "name" VARCHAR(100) NOT NULL,
28
+ "position" VARCHAR(50),
29
+ "number" INTEGER NOT NULL);
30
+ INSERT INTO "players_new" SELECT "id", "team_id", "name", "position", "number" FROM "players";
31
+ DROP TABLE "players";
32
+ ALTER TABLE "players_new" RENAME TO "players";
33
+ CREATE INDEX "index_players_team_id" ON "players" ("team_id");
34
+ COMMIT;
35
+
36
+ BEGIN TRANSACTION;
37
+ CREATE TABLE "teams_new" (
38
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
39
+ "league_id" INTEGER NOT NULL,
40
+ "division_id" INTEGER NOT NULL,
41
+ "name" VARCHAR(50),
42
+ "logo_url" VARCHAR(255),
43
+ "manager" VARCHAR(100) NOT NULL,
44
+ "ballpark" VARCHAR(100),
45
+ "mascot" VARCHAR(100),
46
+ "founded" INTEGER NOT NULL,
47
+ "wins" INTEGER NOT NULL,
48
+ "losses" INTEGER NOT NULL);
49
+ INSERT INTO "teams_new" SELECT "id", "league_id", "division_id", "name", "logo_url", "manager", "ballpark", "mascot", "founded", "wins", "losses" FROM "teams";
50
+ DROP TABLE "teams";
51
+ ALTER TABLE "teams_new" RENAME TO "teams";
52
+ CREATE INDEX "index_teams_division_id" ON "teams" ("division_id");
53
+ CREATE INDEX "index_teams_league_id" ON "teams" ("league_id");
54
+ CREATE INDEX "index_teams_name" ON "teams" ("name");
55
+ COMMIT;
data/db/mlb.sqlite3 CHANGED
Binary file
data/mlb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mlb}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Erik Michaels-Ober"]
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
  "README.rdoc",
23
23
  "Rakefile",
24
24
  "VERSION",
25
+ "db/cleanup.sql",
25
26
  "db/mlb.sqlite3",
26
27
  "lib/mlb.rb",
27
28
  "lib/mlb/player.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mlb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Michaels-Ober
@@ -57,6 +57,7 @@ files:
57
57
  - README.rdoc
58
58
  - Rakefile
59
59
  - VERSION
60
+ - db/cleanup.sql
60
61
  - db/mlb.sqlite3
61
62
  - lib/mlb.rb
62
63
  - lib/mlb/player.rb