易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 65|回复: 0
收起左侧

django 删除同步后的模块app数据同步数据

[复制链接]
发表于 2025-8-18 09:11:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
django 删除同步后的模块app数据同步数据
/ E9 p8 v; N+ F& \$ R2 R
) G+ r' {& H  |8 v; A$ J4 n8 N(python3.8.2-vitual) C:\Users\admin\Desktop\deskdirectory\trip>python manage.py dbshell
; r6 u0 R+ `# q5 E1 X& fWelcome to the MariaDB monitor.  Commands end with ; or \g.
1 L2 j# N  k3 K8 Q" V5 ~1 T- zYour MariaDB connection id is 152
) l; K5 F5 J" x) n0 B! xServer version: 11.5.1-MariaDB mariadb.org binary distribution
2 a* t9 F4 G. V& P8 L( \  {4 h5 |" J+ ~6 `8 d0 q6 C3 G! V( Q% U
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
, t) o& r0 F2 p* o; ~  {4 t6 h  h) \7 Q6 V* R
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.' B* {! D9 {" R) q# t4 ]) a: b! K
- j8 g4 X1 `1 ?# i6 x. X" ]
MariaDB [tripsql]> show tables;
9 O& o' l, M2 ?7 E+-------------------------------+
3 w8 y7 O/ b$ R8 X8 H+ v: |5 Y| Tables_in_tripsql             |
- z; s0 C- X6 a# ~6 `+-------------------------------+
" {5 }' [0 X4 f- P| account_user                  |
( Q$ [/ l. t* h" j! s( P| account_user_groups           |
5 y' Q' b# y5 j5 k* `| account_user_user_permissions |
9 c  ^# T6 {; |8 f* s| accounts_login_record         |
6 ~$ t+ L: w/ M* I| accounts_user_profile         |- V6 o+ u/ q/ f$ F
| auth_group                    |( [- e  |' Q( T  s5 @/ ]0 ^
| auth_group_permissions        |/ n7 K2 Q5 L! ~. U& p
| auth_permission               |0 t$ o0 e, q. H
| auth_user                     |, R+ D) ^5 G4 K1 Q" i8 U- Y* l7 h
| auth_user_groups              |
$ h, }) M' W' t| auth_user_user_permissions    |4 ~# ~* |8 x8 h: V
| django_admin_log              |
# t1 i0 u) X0 w( g" X| django_content_type           |# S: W4 R( A/ u4 R$ e
| django_migrations             |
0 J, Y. G: }4 r& p& e$ ?5 Q| django_session                |8 W" }" K) F* D3 {
| sight                         |
+ v1 U* Y6 c4 n4 a* v; \| sight_comment                 |
& [3 P- l! n9 Q| sight_info                    |
3 V9 [. N, q7 M3 M. W2 ?0 R| sight_ticket                  |
, m" }8 L0 Z' {6 S| system_image_related          |
9 g" x8 i, D: C* c) N0 S# Y! N| system_slider                 |, O+ x8 a) O7 [2 w  B
+-------------------------------+
; t* A! p; K3 L4 q6 z0 W2 ^21 rows in set (0.002 sec)/ O* W) c9 _2 t0 ?( L2 @5 k

& P. a. l3 }9 ~7 J& I/ P3 [7 c& q& V4 S2 _* i6 z
MariaDB [tripsql]> delete from django_migrations where app='order';1 R' }! x  m! _' H9 w" [3 j6 ]
Query OK, 2 rows affected (0.004 sec)
- `# C5 @. p. c" I8 b7 ^3 g5 b, n3 r3 v/ s
MariaDB [tripsql]> exit) E9 N- \: _9 ]: K9 j# J" T
Bye! Z0 q2 D* l! w' v6 {
4 N- y, J4 y2 [& Y# g" a
(python3.8.2-vitual) C:\Users\admin\Desktop\deskdirectory\trip>python manage.py migrate order
/ v9 d6 V) X9 @' S2 k: F. |Operations to perform:
# Z  ?. q* k6 M* _  Apply all migrations: order
! ?2 @% n+ G/ \2 s  RRunning migrations:3 w! Z# b" g; E8 x& r( Z
  Applying order.0001_initial... OK% ~, O* t$ j. _$ f1 K5 l

- u# s, l" Z0 e7 [6 m+ a(python3.8.2-vitual) C:\Users\admin\Desktop\deskdirectory\trip>; v* X4 s, H" i
这次成功同步过去了。
+ b. E% Q7 V4 c  j' ^# v" \/ ~! x) c  F, T
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:18 , Processed in 0.043023 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表