Make exports#key not-null
This commit is contained in:
parent
fc49b7952e
commit
7f3d4a26ad
3 changed files with 8 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
# id :bigint not null, primary key
|
# id :bigint not null, primary key
|
||||||
# format :string not null
|
# format :string not null
|
||||||
# key :text
|
# key :text not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
#
|
#
|
||||||
|
|
5
db/migrate/20210402163003_exports_key_not_null.rb
Normal file
5
db/migrate/20210402163003_exports_key_not_null.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class ExportsKeyNotNull < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
change_column_null :exports, :key, false
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2021_03_31_123709) do
|
ActiveRecord::Schema.define(version: 2021_04_02_163003) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -354,7 +354,7 @@ ActiveRecord::Schema.define(version: 2021_03_31_123709) do
|
||||||
t.string "format", null: false
|
t.string "format", null: false
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.text "key"
|
t.text "key", null: false
|
||||||
t.index ["format", "key"], name: "index_exports_on_format_and_key", unique: true
|
t.index ["format", "key"], name: "index_exports_on_format_and_key", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue