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:
parent
8e890fbaa6
commit
56f38bcdcf
2 changed files with 7 additions and 2 deletions
5
db/migrate/20150628113425_make_package_name_not_null.rb
Normal file
5
db/migrate/20150628113425_make_package_name_not_null.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class MakePackageNameNotNull < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :packages, :name, :string, null: false
|
||||
end
|
||||
end
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue