Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. public function up()
  2. {
  3. if(!Schema::hasTable('asignaturas_alumno')){
  4. Schema::create('asignaturas_alumno',function (Blueprint $table){
  5. $table->engine = 'InnoDB';
  6. $table->bigInteger('id_curso_asignatura');
  7. $table->bigInteger('id_alumno');
  8. $table->bigInteger('id_curso_escolar');
  9. $table->primary(['id_alumno','id_curso_escolar','id_curso_asignatura']);
  10. });
  11. }
  12.  
  13. }
  14.  
  15. [IlluminateDatabaseQueryException]
  16. SQLSTATE[42000]: Syntax error or access violation: 1059 Identifier name
  17. 'asignaturas_alumno_id_alumno_id_curso_escolar_id_curso_asignatura_primary' is
  18. too long (SQL: alter tabl
  19. e `asignaturas_alumno` add primary key `asignaturas_alumno_id_alumno_id_curso_escolar_id_curso_asignatura_primary`(`id_alumno`, `id_curso_escolar`, `id_curso_asignatura`))
  20.  
  21.  
  22.  
  23. [DoctrineDBALDriverPDOException]
  24. SQLSTATE[42000]: Syntax error or access violation: 1059 Identifier name 'asignaturas_alumno_id_alumno_id_curso_escolar_id_curso_asignatura_primary' is too long
  25.  
  26.  
  27.  
  28. [PDOException]
  29. SQLSTATE[42000]: Syntax error or access violation: 1059 Identifier name 'asignaturas_alumno_id_alumno_id_curso_escolar_id_curso_asignatura_primary' is too long
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement