找回密码
 注册
查看: 72|回复: 0

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2025-8-18 09:11:58 | 显示全部楼层 |阅读模式
django 删除同步后的模块app数据同步数据
, |( E; j" G. {! e3 A3 @
- i( z; t' \8 H) y7 e(python3.8.2-vitual) C:\Users\admin\Desktop\deskdirectory\trip>python manage.py dbshell
8 u- Z- H) s. V: @Welcome to the MariaDB monitor.  Commands end with ; or \g.& ^, }" A$ ~, A" j& i/ t
Your MariaDB connection id is 152  d! |( [% k) {& Z7 Z% x+ b
Server version: 11.5.1-MariaDB mariadb.org binary distribution
2 B! w* d. g* L7 F6 J/ t8 b' E9 z) Z- T4 u
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
5 g2 J7 J, Z3 ~! s! o3 b- J
" s2 o, ]0 b2 R' AType 'help;' or '\h' for help. Type '\c' to clear the current input statement.1 y7 U0 H5 R! h# y
# T6 F; F% f0 g* ^9 Q9 ?! H: J
MariaDB [tripsql]> show tables;) `8 B' D, I( ~$ m: ^, u
+-------------------------------+
( a& w7 `) o, k6 B| Tables_in_tripsql             |; N: X8 c$ u" ?5 s
+-------------------------------+6 K% O- f4 ^' Q& e) t9 u
| account_user                  |4 F7 u1 |+ b8 l6 X- p
| account_user_groups           |
% q4 ]  q  i; N/ J- n| account_user_user_permissions |/ g. o% U# C2 i# n0 Y4 o' ]" w# J
| accounts_login_record         |
1 E% a; k% ^3 I' p4 X- V| accounts_user_profile         |
' l' ~+ C9 ~4 F6 P| auth_group                    |
# Q( i; q0 w6 i| auth_group_permissions        |+ S6 ^1 G  T" c9 k9 U
| auth_permission               |
5 \7 k7 E# K  G) E) A* || auth_user                     |+ c3 v( ?8 j* [  o8 q
| auth_user_groups              |
3 L. D. K/ ]8 k# Y* q7 v| auth_user_user_permissions    |
' m. P* ~9 V# Y- M* k| django_admin_log              |3 H, O. }2 ]( ~  o* C- j. \; J
| django_content_type           |
5 P/ R1 [3 R# N! ^% A$ j| django_migrations             |! u2 t, w3 t6 i' R# A, s
| django_session                |% b, U7 ^- E7 T
| sight                         |1 s7 a2 }# a7 q5 I1 V: K) s4 Q
| sight_comment                 |! [! ?0 f3 v  `, e8 a
| sight_info                    |  x' f$ Q# Z8 N* ^! f
| sight_ticket                  |
" A5 {+ d- y( G- x! U| system_image_related          |9 }/ a1 K* z% z
| system_slider                 |
) t2 S% R& r" t0 I0 o+-------------------------------+" W& @1 s1 M0 |$ A( F% s2 x, Q6 q
21 rows in set (0.002 sec)
. y3 `4 w2 m$ L5 H7 Y. t
8 ]& N6 D9 [6 L) W
# Y9 A" F; i( `, E% j2 P; J8 d3 sMariaDB [tripsql]> delete from django_migrations where app='order';
3 Z0 @5 s& x9 b* P" b' FQuery OK, 2 rows affected (0.004 sec)- J! Z! D) A( L5 |. @; R! g, U
1 ?+ Y. v9 N- a$ s0 ]3 {2 J
MariaDB [tripsql]> exit) V- u: V4 @% k, J4 C# W
Bye
, U- n' ?" Z7 I5 Q% J+ Y& Z  i* U% Q7 R" K3 z# c
(python3.8.2-vitual) C:\Users\admin\Desktop\deskdirectory\trip>python manage.py migrate order% l! S5 A" j! H. o* y8 e
Operations to perform:+ n) [3 Q3 w5 v& V2 B
  Apply all migrations: order* Q: r! b2 N0 T* X$ M; H) n
Running migrations:- _7 n3 j, o3 p5 r, K% s- N
  Applying order.0001_initial... OK
! X( Z  c0 v. i9 s4 G9 C# d9 E" Y* ]
(python3.8.2-vitual) C:\Users\admin\Desktop\deskdirectory\trip>
2 u, v+ w& e% S( j$ y这次成功同步过去了。
, l" d3 d$ u' v3 m0 ~- ~& ]3 ]! D$ V$ k0 E
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-11 23:14 , Processed in 0.017554 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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