I'm checking the operation in the production environment.
ActiveRecord :: NotNullViolation (Mysql2 :: Error: Field'latitude' doesn't have a default value
In the production environment, the error amount was spit out like this.
When I looked it up, it was written that due to the nature of MySql, it could not be saved unless it had a value.
So I thought about putting the default value in the migrate file and dealing with it
I specified the latitude and longitude of Tokyo Tower by default
class CreatePhotos</pre> <pre><code data-language = "console">ActiveRecord :: NotNullViolation (Mysql2 :: Error: Field'latitude' doesn't have a default value):
I can't get out of this error.
Do you know who you are? ??
We have already updated the database in the production environment
Answer # 1
Maybe I added default after migrating create_table: photos once.
Then it will not be added.
Recreate the database from scratch
Do you make a migration to add default
- mysql - can't rails db:create in production environment
- mysql - want to have the same db table structure in the production environment and development environment
- mysql - i want to connect sequel pro to a production environment
- [mysql, production environment] can't connect to local mysql server via socket
- i want to create a temporary column in mysql
- transition from wordpress production environment to local (xampp)
- postgresql - not in kana order in production environment
- ruby on rails - aws production environment i want to deploy
- i built an environment for docker, ruby on rails and mysql, but i can't access it on localhost3000
- ruby - i want to start rails in production environment
- php - is docker used for production environment in web production?
- mysql - cannot add column in heidisql
- mysql - i don't know how to write index qualifiers and column qualifiers for php laravel migration files
- php - i want to move to the production environment of wordpress
- mysql - i want to make the column set as "primary key and foreign key" only "foreign key"
- i want to fix the code in the wordpress production environment
- https - when i search the site i uploaded to the production environment, "the connection is not private" is displayed
- ruby - can't save after changing column in production environment
- ruby - when i try to save data from rails console, id, created_at, updated_at become nil
- mysql - i'm having trouble getting the name of the person who posted the message to appear in the view
- ruby - when posting an image, an error occurs where the image is not defined
- ruby - i want to have a foreign key after creating a table
- php - i want to display two columns of the database
- php: i want to specify a line in the database and display it
- mysql - comments cannot be posted due to user validation error