Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [IlluminateDatabaseQueryException]
- SQLSTATE[HY000]: General error: 1005 Can't create table `consultorio`.`#sql-1e78_69` (errno: 150 "Foreign key const
- raint is incorrectly formed") (SQL: alter table `consultas` add constraint `consultas_id_doctors_foreign` foreign k
- ey (`id_doctors`) references `doctors` (`id`))
- [PDOException]
- SQLSTATE[HY000]: General error: 1005 Can't create table `consultorio`.`#sql-1e78_69` (errno: 150 "Foreign key const
- raint is incorrectly formed")
- Schema::create('consultas', function (Blueprint $table) {
- $table->increments('id');
- $table->date('fecha');
- $table->string('patologia');
- $table->integer('id_doctors')->unsigned();
- $table->foreign('id_doctors')->references('id')->on('doctors');
- $table->integer('id_pacientes')->unsigned();
- $table->foreign('id_pacientes')->references('id')->on('pacientes');
- $table->timestamps();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement