Category: MySQL 5.7
-
Post Views: 10 1. Table name: CPA_CHANNEL_APP_SOURCE design, table prefix: CPA_, as shown in Figure 1 2. View command: yii migrate/create help documentation 3. Add field. If the migrated name follows the format of add_xxx_to_yyy, the generated class file will contain the necessary addColumn and dropColumn. You can specify multiple fields like this: yii migrate/create add_xxx_column_yyy_column_to_zzz_table –fields=”xxx:integer,yyy:text”. as shown in…
-
Post Views: 13 1. In the topic selection list page, whether it has been extended, 0: no; 1: Yes, this field does not exist in the topic selection table. is calculated by program. $time is the current Beijing time, calculated by the server. as shown in Figure 1 2. In the latest version of the prototype, you need to support…
-
Post Views: 20 1. At this stage, there is a new requirement, and it is necessary to do some initial data work for the product when deploying the product. Prepare the corresponding SQL file in advance. Since multiple SQL statements need to be executed, and subsequent SQL statements depend on the primary key ID generated by the previous SQL statement.…
-
Post Views: 13 1. In Yii 2.0, the realization of health check, a colleague implemented a version before, I feel that it is necessary to adjust it again 2. The analysis code found that yii::$app->db->getisActive() is unnecessary. View the source code of the corresponding method separately. The related implementation of $this->pdo in getIsActive() already exists in open() . 3. Analyze…
-
Post Views: 14 1. In the previous release interface, only one channel is supported for a release. Therefore, the release of the three channels needs to call the interface (APP, Netease account, Weibo) 3 times respectively, as shown in Figure 1 2. On the current release interface, it is ready to publish at one time and can be published on…
-
Post Views: 19 1. The article involving the 1st table, the Penguin number: cpa_qq_article, the field needs to be verified: the uniqueness of the title, the structure of the table is shown in Figure 1 2. The task of the application of the channel involved in the second table, the application task of the channel: CPA_CHANNEL_APP_TASK, field: task_id and the…
-
Post Views: 60 1. In Navicat for MySQL, when editing the database, the database name cannot be edited, as shown in Figure 1 2. Rename the database in phpmyadmin, it can be seen that phpmyadmin can support the operation of direct rename, as shown in Figure 2 3. Prepare to rename g-s-yii2-app-advanced-test in Navicat for mysql, and create a new…
-
Post Views: 17 1. Get the task list of the application of the Penguin, the list is empty, as shown in Figure 1 2. Types of published articles: standard (normal, graphic) articles, successful publishing (that is, the storage is successful), check the sql statement of the publishing task, as shown in Figure 2 3. Get the task list of the…
-
Post Views: 14 1. Perform database migration in Yii 2.0: the MediumText type of MySQL. The four text types are TinyText, Text, MediumText, and LongText. Only supported: text 2. Reference file: \vendor\yiisoft\yii2\db\schemabuildertrait.php, copy to \console\db\mysql\schemabuildertrait.php, refer to the implementation of the text type, add support for tinytext, mediumtext, and longtext 3. In the database migration file, refer to the newly…