当我迁移文件时,它向我显示此错误(提供了图像链接)。我尝试了migration:rollback,migrate:refresh,但没有用。
https://i.imgur.com/oFjcadB.png
Illuminate \ Database \ QueryException:SQLSTATE [HY000]:常规错误:1005无法创建表种子。#sql-16d8_15(错误号:150“外键约束格式不正确”)(SQL:alter table posts添加约束posts_user_id_foreign外键(user_id)在删除级联时引用用户(id)
答案 0 :(得分:0)
只需手动删除表
或运行#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <string.h>
struct mesg_buffer {
long mtype;
char mtext[100];
};
int main(void){
struct mesg_buffer message;
int sq_msgid, uq_msgid;
sq_msgid = msgget(ftok("server_queue",1), 0666 | IPC_CREAT);
strcpy(message.mtext, "join");
message.mtype = 1;
int r = msgsnd(sq_msgid, &message, sizeof(message), 0);
printf("%d", r);
}