From 336f0213d9ca444fba2383e2214d2f3ed916bdb7 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Sat, 28 Feb 2015 17:48:49 +0000 Subject: [PATCH] Require explicit version number for asciicast "version" column --- .../20150228174314_remove_default_from_asciicasts_version.rb | 5 +++++ db/schema.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20150228174314_remove_default_from_asciicasts_version.rb diff --git a/db/migrate/20150228174314_remove_default_from_asciicasts_version.rb b/db/migrate/20150228174314_remove_default_from_asciicasts_version.rb new file mode 100644 index 0000000..05ce79a --- /dev/null +++ b/db/migrate/20150228174314_remove_default_from_asciicasts_version.rb @@ -0,0 +1,5 @@ +class RemoveDefaultFromAsciicastsVersion < ActiveRecord::Migration + def change + change_column_default :asciicasts, :version, nil + end +end diff --git a/db/schema.rb b/db/schema.rb index 926c761..86a0446 100644 --- a/db/schema.rb +++ b/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: 20150227112949) do +ActiveRecord::Schema.define(version: 20150228174314) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -53,7 +53,7 @@ ActiveRecord::Schema.define(version: 20150227112949) do t.string "user_agent" t.string "theme_name" t.float "snapshot_at" - t.integer "version", default: 0, null: false + t.integer "version", null: false t.string "file" end