️V
Size: a a a
️V
🥰A
optimize:clear *AH
️V
d
VB
?
Schema::create('np_cities', function (Blueprint $table) {
$table->string('ref', 191);
$table->string('area_ref');
$table->string('settlement_type')->nullable();
$table->timestamps();
});
Schema::create('np_city_translations', function (Blueprint $table) {
$table->string('np_city_ref', 191);
$table->string('locale');
$table->text('description');
$table->text('area_description')->nullable();
$table->foreign('np_city_ref')->references('ref')->on('np_cities');
});
Ошибка:SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table `np_city_translations` add constraint `np_city_translations_np_city_ref_foreign` foreign key (`np_city_ref`) references `np_cities` (`ref`))
AH
ПК
?
Schema::create('np_cities', function (Blueprint $table) {
$table->string('ref', 191)->primary();
$table->string('area_ref');
$table->string('settlement_type')->nullable();
$table->timestamps();
});
Schema::create('np_city_translations', function (Blueprint $table) {
$table->string('np_city_ref', 191);
$table->string('locale');
$table->text('description');
$table->text('area_description')->nullable();
$table->foreign('np_city_ref')->references('ref')->on('np_cities');
});d
?
d
?

d
?
d
?
d
d