Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Update modules synchronization database in Django 1.10

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

When the django version is not specified, the latest version is automatically installed.

Since version 1. 9 of django, the relevant commands have changed.

The following is the synchronization database

[root@Centos7-33 mydjango] # python3 manage.py makemigrationsNo changes detected [root@Centos7-33 mydjango] # python3 manage.py makemigrations app01Migrations for 'app01': app01/migrations/0001_initial.py:-Create model Author-Create model Book-Create model Publisher-Create model user-Add field publisher to book [root@Centos7-33 mydjango] # python3 manage.py migrateOperations to perform: Apply all migrations: admin, app01, auth, contenttypes, sessionsRunning migrations: Applying app01.0001_initial... OK

View database data:

[root@Centos7-33 mydjango] # mysql-uroot-paired Aaxxxxxx'-U linweb-e 'show tables 'mysql: [Warning] Using a password on the command line interface can be insecure.+--+ | Tables_in_linweb | +-+ | app01_author | | app01_book | | app01_book_authors | | app01_publisher | | app01_user | | auth_group | | auth_group_permissions | | auth_permission | | auth_user | | auth_user_groups | | auth_user_user_permissions | | django_admin_log | | django_content_type | | django_migrations | | django_session | | | +-+

As shown in the figure:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report