Make sure that a package has a valid name

If this contraint had been there I would have found a bug
in the import_debian Rake task much sooner.
This commit is contained in:
Christoph Haas 2015-06-28 15:08:16 +02:00
parent 8e890fbaa6
commit 56f38bcdcf
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
class MakePackageNameNotNull < ActiveRecord::Migration
def change
change_column :packages, :name, :string, null: false
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150503133405) do
ActiveRecord::Schema.define(version: 20150628113425) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -27,7 +27,7 @@ ActiveRecord::Schema.define(version: 20150503133405) do
end
create_table "packages", force: :cascade do |t|
t.string "name", limit: 100
t.string "name", null: false
t.string "description", limit: 80
t.string "section", limit: 50
t.string "maintainer", limit: 100