Discuss / JavaScript / int.txt文件下的create table pets不就是创建表‘pets’吗?

int.txt文件下的create table pets不就是创建表‘pets’吗?

Topic source

iFayeee

#1 Created at ... [Delete] [Delete and Lock User]

为什么我直接运行的时候提示,table test.pets doesn't exist;非得我手动在mysql命令行中创建一个表'pets'才运行成功? 那这个init 文件下的

create table pets

有什么用?

iFayeee

#2 Created at ... [Delete] [Delete and Lock User]

好吧,我知道了,因为Sequelize不能创建数据库,所以需要手动创建一个数据库,sequelize能干的活是从创建数据表开始的。马丹,这问题纠结了我一上午时间,哎


  • 1

Reply