Save workspace changes
This commit is contained in:
31
temp-check-user-id-cols.php
Normal file
31
temp-check-user-id-cols.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
$app = require __DIR__.'/bootstrap/app.php';
|
||||
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
$tables = [
|
||||
'artworks_comments',
|
||||
'artworks_downloads',
|
||||
'blog_articles',
|
||||
'chat',
|
||||
'favourites',
|
||||
'featured_works',
|
||||
'forum_posts',
|
||||
'forum_topics',
|
||||
'friends_list',
|
||||
'news',
|
||||
'news_comment',
|
||||
'users_comments',
|
||||
'users_opinions',
|
||||
'wallz',
|
||||
];
|
||||
|
||||
foreach ($tables as $table) {
|
||||
$cols = array_column(
|
||||
\Illuminate\Support\Facades\DB::connection('legacy')->select("SHOW COLUMNS FROM `{$table}`"),
|
||||
'Field'
|
||||
);
|
||||
$has = in_array('user_id', $cols) ? 'YES' : 'NO ';
|
||||
// Also show all columns for context
|
||||
echo str_pad($table, 25) . " user_id={$has} cols: " . implode(', ', $cols) . PHP_EOL;
|
||||
}
|
||||
Reference in New Issue
Block a user