Category: MySQL 5.7
-
Post Views: 155 1. There is a Shopify PHP application, which can already be previewed in the development environment. as shown in Figure 1 2. Now it is ready to be deployed to the production environment. Shopify recommends creating a separate application if you need to deploy the application to the production environment. This application shares the code base with…
-
Post Views: 15 1. In the MySQL table, the field type is JSON, and it is allowed to be null. as shown in Figure 1 2. Since only is_null() is judged in the program, if it is not null, the default is json format. When its value is String(4) “NULL”, the program throws a 500 exception. Displayed as null, indicating…
-
Post Views: 19 1. Adding fields to a table takes 180 seconds. as shown in Figure 1 2. The total number of records in the query table is: 173816. as shown in Figure 2 3. Decide to allow the newly added field to be null, and add the field again, which takes 104 seconds. as shown in Figure 3 4.…
-
Post Views: 17 1. In MySQL 5.7, the data in the json type field is an array, and its value is:[365]. as shown in Figure 1 2. Reference: Query the constructor – where statement – json where statement:https://learnku.com/docs/laravel/6.x/queries/5171#35d9d9. JSON arrays can be queried using WhereJsonContains. as shown in Figure 2 3. The code is implemented as follows 4. Print the…
-
Post Views: 18 1. Doctrine\dbal\exception : unknown database type enum requested, doctrine\dbal\platforms\mysql57platform may not support it.. as shown in Figure 1 2. View the migration file, enum does not exist in the updated field type 3. The reason for the final determination may be that in the table involved in this migration file, the type of other fields is enum.…
-
Post Views: 16 1. The current implementation principle of the theme editor is: when a configuration item in the editor changes, the temporary storage API of the backend will be requested to cache the data to Redis. When the user clicks the save button, the save API of the backend is requested, and the data will be read from Redis…
-
Post Views: 21 1. Existing code implementation 2. The final generated structure is as follows, which is an array with the field name: SETTING_MIGRATIONS 3. Decide to adjust the name of the adjustment field as extra, and include the value of the setting_migrations field. The code is adjusted as follows, based on the helper function ar. 4. The final generated…
-
Post Views: 16 1. In Navicat for MySQL, when the table is copied from one database to another, an error is reported:[ERR]1292 – Incorrect DateTime Value:0000-00-00 00:00:00for columnCREATED_AT_GMTat row 1. as shown in Figure 1 2. Execute: Select version(), it is found that the version of the two database software is inconsistent. They are: 5.7.19-log and 8.0.23-0ubuntu0.20.04.1. as shown in…
-
Post Views: 19 1. In Laravel 6, after the model applies soft deletion, the record is inserted again, and the unique key conflicts. as shown in Figure 1 2. The reason is that after applying soft deletion, when you use the delete method on the model instance, the current date and time will be written to the deleted_at field. At…