阿亮 发布的文章

Check what's the CONSTRAINT name and the FOREIGN KEY name:

SHOW CREATE TABLE table_name;

Remove both the CONSTRAINT name and the FOREIGN KEY name:

ALTER TABLE table_name
  DROP FOREIGN KEY the_name_after_CONSTRAINT,
  DROP KEY the_name_after_FOREIGN_KEY;

Or simply run this if you know the foreign key name:

alter table footable drop foreign key fooconstraint

原文:https://stackoverflow.com/questions/838354/mysql-removing-some-foreign-keys

Issues:

I want to recreate the migrations, so I deleted files under migrations folder, and drop the database. And try this python manage.py makemigrations, it reponse No changes detected.

Fix:

Create the database again, and clear files and folders under migrations, then try the following:

  1. python manage.py makemigrations --empty appname
  2. python manage.py makemigrations
  3. python manage.py migrate

It works!

Background

mysql server was installed by brew install mysql

Issues like this:

ERROR: Failed building wheel for mysqlclient

ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1

Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?



- 阅读剩余部分 -

linux_android_huawei.jpg

自从华为被ARM和Android"封锁令"一系列负面消息来袭之后,关于华为的鸿蒙系统新闻层出不穷。
另据国家知识产权局商标查询显示,华为今年5月份和6月份申请了商标名称为"鸿蒙"的多个类目商标。这个时间前后也有许多公司和个人开始抢注"鸿蒙"为关键字的不同类目的商标。
其实按照以往的营销策略,一开始大V如华为高管在微博散布消息,之后开始让媒体热炒,再加上用户的跟风等一系列炒作之后,基本上就可以看到具体上线时间了。不过对于研发一款多平台支持的OS来说并不是易事。



- 阅读剩余部分 -