main
vine_liutk 2024-02-27 11:33:59 +08:00
parent 83dccf917b
commit 892dc51c15
5 changed files with 5 additions and 4 deletions

View File

@ -78,9 +78,6 @@ return [
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [

View File

@ -17,6 +17,8 @@ class ArticleCategorySeeder extends Seeder
public function run()
{
//老文章分类表
DB::connection('djc_mysql')->getPdo()->exec("SET NAMES 'utf8'");
$oldCates = DB::connection('djc_mysql')->table('t_article_type')->get()->sortBy('pid');
$newCategories = [];

View File

@ -17,6 +17,7 @@ class KeywordDictSeeder extends Seeder
*/
public function run()
{
DB::connection('djc_mysql')->getPdo()->exec("SET NAMES 'utf8'");
$oldDicts = DB::connection('djc_mysql')->table('t_data_dict')->get();
$newKeywords = [];

View File

@ -19,7 +19,7 @@ class PersonMoveSeeder extends Seeder
public function run()
{
DB::table('person_changes')->truncate();
DB::connection('djc_mysql')->getPdo()->exec("SET NAMES 'utf8'");
DB::connection('djc_mysql')->table('t_person_move')->orderBy('id', 'ASC')->chunk(1000, function($personMoves){
$newlogs = [];
if($personMoves->count() > 0){

View File

@ -19,6 +19,7 @@ class PersonSeeder extends Seeder
{
DB::table('persons')->truncate();
DB::connection('djc_mysql')->getPdo()->exec("SET NAMES 'utf8'");
DB::connection('djc_mysql')->table('t_person')->orderBy('id', 'ASC')->chunk(100, function($persons){
// $newPersons = [];