我已經遷移MySQL數據庫向PostgreSQL &替換查詢 SHOW FULL COLUMNS FROM schema_name.table_name; 有一個Postgres等同, SELECT * FROM information_schema.columns WHERE table_schema = 'schema_name' and table_name = 'table_name';
我使用遷移將nullable()添加到列。 class ChangeUgIdCanNull extends Migration
{
public function up()
{
Schema::table('service_request_step', function (Blueprint $table) {
$table->dropForeign([
需要幫助傢伙!我的遷移有什麼問題,它不會創建users表和posts表之間的關係。下面是我所做的: 遷移用戶表 創造職位表 遷移職位表的外鍵 用戶遷移: <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable e