0017_auto.py 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. # -*- coding: utf-8 -*-
  2. import datetime
  3. from south.db import db
  4. from south.v2 import SchemaMigration
  5. from django.db import models
  6. class Migration(SchemaMigration):
  7. def forwards(self, orm):
  8. # Removing M2M table for field new_authors on 'Book'
  9. db.delete_table("catalog_book_new_authors")
  10. def backwards(self, orm):
  11. # Adding M2M table for field new_authors on 'Book'
  12. db.create_table(
  13. "catalog_book_new_authors",
  14. (
  15. (
  16. "id",
  17. models.AutoField(
  18. verbose_name="ID", primary_key=True, auto_created=True
  19. ),
  20. ),
  21. ("book", models.ForeignKey(orm["catalog.book"], null=False)),
  22. ("person", models.ForeignKey(orm["catalog.person"], null=False)),
  23. ),
  24. )
  25. db.create_unique("catalog_book_new_authors", ["book_id", "person_id"])
  26. models = {
  27. "auth.group": {
  28. "Meta": {"object_name": "Group"},
  29. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  30. "name": (
  31. "django.db.models.fields.CharField",
  32. [],
  33. {"unique": "True", "max_length": "80"},
  34. ),
  35. "permissions": (
  36. "django.db.models.fields.related.ManyToManyField",
  37. [],
  38. {
  39. "to": "orm['auth.Permission']",
  40. "symmetrical": "False",
  41. "blank": "True",
  42. },
  43. ),
  44. },
  45. "auth.permission": {
  46. "Meta": {
  47. "ordering": "('content_type__app_label', 'content_type__model', 'codename')",
  48. "unique_together": "(('content_type', 'codename'),)",
  49. "object_name": "Permission",
  50. },
  51. "codename": (
  52. "django.db.models.fields.CharField",
  53. [],
  54. {"max_length": "100"},
  55. ),
  56. "content_type": (
  57. "django.db.models.fields.related.ForeignKey",
  58. [],
  59. {"to": "orm['contenttypes.ContentType']"},
  60. ),
  61. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  62. "name": ("django.db.models.fields.CharField", [], {"max_length": "50"}),
  63. },
  64. "auth.user": {
  65. "Meta": {"object_name": "User"},
  66. "date_joined": (
  67. "django.db.models.fields.DateTimeField",
  68. [],
  69. {"default": "datetime.datetime.now"},
  70. ),
  71. "email": (
  72. "django.db.models.fields.EmailField",
  73. [],
  74. {"max_length": "75", "blank": "True"},
  75. ),
  76. "first_name": (
  77. "django.db.models.fields.CharField",
  78. [],
  79. {"max_length": "30", "blank": "True"},
  80. ),
  81. "groups": (
  82. "django.db.models.fields.related.ManyToManyField",
  83. [],
  84. {"to": "orm['auth.Group']", "symmetrical": "False", "blank": "True"},
  85. ),
  86. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  87. "is_active": (
  88. "django.db.models.fields.BooleanField",
  89. [],
  90. {"default": "True"},
  91. ),
  92. "is_staff": (
  93. "django.db.models.fields.BooleanField",
  94. [],
  95. {"default": "False"},
  96. ),
  97. "is_superuser": (
  98. "django.db.models.fields.BooleanField",
  99. [],
  100. {"default": "False"},
  101. ),
  102. "last_login": (
  103. "django.db.models.fields.DateTimeField",
  104. [],
  105. {"default": "datetime.datetime.now"},
  106. ),
  107. "last_name": (
  108. "django.db.models.fields.CharField",
  109. [],
  110. {"max_length": "30", "blank": "True"},
  111. ),
  112. "password": (
  113. "django.db.models.fields.CharField",
  114. [],
  115. {"max_length": "128"},
  116. ),
  117. "user_permissions": (
  118. "django.db.models.fields.related.ManyToManyField",
  119. [],
  120. {
  121. "to": "orm['auth.Permission']",
  122. "symmetrical": "False",
  123. "blank": "True",
  124. },
  125. ),
  126. "username": (
  127. "django.db.models.fields.CharField",
  128. [],
  129. {"unique": "True", "max_length": "30"},
  130. ),
  131. },
  132. "catalog.book": {
  133. "Meta": {"object_name": "Book", "_ormbases": ["catalog.Item"]},
  134. "authors": (
  135. "django.db.models.fields.related.ManyToManyField",
  136. [],
  137. {
  138. "symmetrical": "False",
  139. "to": "orm['catalog.Person']",
  140. "null": "True",
  141. "blank": "True",
  142. },
  143. ),
  144. "dimensions": (
  145. "django.db.models.fields.CharField",
  146. [],
  147. {"max_length": "20", "null": "True", "blank": "True"},
  148. ),
  149. "edition": (
  150. "django.db.models.fields.CharField",
  151. [],
  152. {"max_length": "50", "null": "True", "blank": "True"},
  153. ),
  154. "editors": (
  155. "django.db.models.fields.CharField",
  156. [],
  157. {"max_length": "200", "null": "True", "blank": "True"},
  158. ),
  159. "features": (
  160. "django.db.models.fields.CharField",
  161. [],
  162. {"max_length": "100", "null": "True", "blank": "True"},
  163. ),
  164. "genre": (
  165. "django.db.models.fields.CharField",
  166. [],
  167. {"max_length": "100", "null": "True", "blank": "True"},
  168. ),
  169. "illustrator": (
  170. "django.db.models.fields.CharField",
  171. [],
  172. {"max_length": "200", "null": "True", "blank": "True"},
  173. ),
  174. "isbn": (
  175. "django.db.models.fields.CharField",
  176. [],
  177. {"max_length": "20", "null": "True", "blank": "True"},
  178. ),
  179. "item_ptr": (
  180. "django.db.models.fields.related.OneToOneField",
  181. [],
  182. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  183. ),
  184. "library_of_congress_number": (
  185. "django.db.models.fields.CharField",
  186. [],
  187. {"max_length": "20", "null": "True", "blank": "True"},
  188. ),
  189. "pages": (
  190. "django.db.models.fields.IntegerField",
  191. [],
  192. {"null": "True", "blank": "True"},
  193. ),
  194. "printer": (
  195. "django.db.models.fields.CharField",
  196. [],
  197. {"max_length": "200", "null": "True", "blank": "True"},
  198. ),
  199. "publish_date": (
  200. "django.db.models.fields.CharField",
  201. [],
  202. {"max_length": "20", "null": "True", "blank": "True"},
  203. ),
  204. "publisher": (
  205. "django.db.models.fields.CharField",
  206. [],
  207. {"max_length": "200", "null": "True", "blank": "True"},
  208. ),
  209. "subtitle": (
  210. "django.db.models.fields.CharField",
  211. [],
  212. {"max_length": "100", "null": "True", "blank": "True"},
  213. ),
  214. },
  215. "catalog.item": {
  216. "Meta": {"object_name": "Item"},
  217. "created": (
  218. "django.db.models.fields.DateTimeField",
  219. [],
  220. {"auto_now_add": "True", "blank": "True"},
  221. ),
  222. "created_by": (
  223. "django.db.models.fields.related.ForeignKey",
  224. [],
  225. {"related_name": "'+'", "to": "orm['auth.User']"},
  226. ),
  227. "deleted": (
  228. "django.db.models.fields.BooleanField",
  229. [],
  230. {"default": "False"},
  231. ),
  232. "featured": (
  233. "django.db.models.fields.BooleanField",
  234. [],
  235. {"default": "False"},
  236. ),
  237. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  238. "image": (
  239. "sorl.thumbnail.fields.ImageField",
  240. [],
  241. {"max_length": "100", "null": "True", "blank": "True"},
  242. ),
  243. "is_active": (
  244. "django.db.models.fields.BooleanField",
  245. [],
  246. {"default": "True"},
  247. ),
  248. "last_updated": (
  249. "django.db.models.fields.DateTimeField",
  250. [],
  251. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  252. ),
  253. "last_updated_by": (
  254. "django.db.models.fields.related.ForeignKey",
  255. [],
  256. {"related_name": "'+'", "to": "orm['auth.User']"},
  257. ),
  258. "long_description": (
  259. "django.db.models.fields.TextField",
  260. [],
  261. {"null": "True", "blank": "True"},
  262. ),
  263. "price": (
  264. "django.db.models.fields.DecimalField",
  265. [],
  266. {"max_digits": "7", "decimal_places": "2"},
  267. ),
  268. "shipping_cost": (
  269. "django.db.models.fields.DecimalField",
  270. [],
  271. {"max_digits": "7", "decimal_places": "2"},
  272. ),
  273. "shipping_cost_multiple": (
  274. "django.db.models.fields.DecimalField",
  275. [],
  276. {"max_digits": "7", "decimal_places": "2"},
  277. ),
  278. "sku": (
  279. "django.db.models.fields.SlugField",
  280. [],
  281. {"unique": "True", "max_length": "20"},
  282. ),
  283. "subclass_type": (
  284. "django.db.models.fields.CharField",
  285. [],
  286. {"max_length": "200"},
  287. ),
  288. "synopsis": (
  289. "django.db.models.fields.CharField",
  290. [],
  291. {"max_length": "200", "null": "True", "blank": "True"},
  292. ),
  293. "tax_free": (
  294. "django.db.models.fields.BooleanField",
  295. [],
  296. {"default": "False"},
  297. ),
  298. "title": ("django.db.models.fields.CharField", [], {"max_length": "50"}),
  299. },
  300. "catalog.map": {
  301. "Meta": {"object_name": "Map", "_ormbases": ["catalog.Item"]},
  302. "dimensions": (
  303. "django.db.models.fields.CharField",
  304. [],
  305. {"max_length": "20", "null": "True", "blank": "True"},
  306. ),
  307. "item_ptr": (
  308. "django.db.models.fields.related.OneToOneField",
  309. [],
  310. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  311. ),
  312. },
  313. "catalog.movie": {
  314. "Meta": {"object_name": "Movie", "_ormbases": ["catalog.Item"]},
  315. "captioning": (
  316. "django.db.models.fields.CharField",
  317. [],
  318. {"max_length": "50", "null": "True", "blank": "True"},
  319. ),
  320. "format": (
  321. "django.db.models.fields.CharField",
  322. [],
  323. {"max_length": "20", "null": "True", "blank": "True"},
  324. ),
  325. "genre": (
  326. "django.db.models.fields.CharField",
  327. [],
  328. {"max_length": "100", "null": "True", "blank": "True"},
  329. ),
  330. "item_ptr": (
  331. "django.db.models.fields.related.OneToOneField",
  332. [],
  333. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  334. ),
  335. "language": (
  336. "django.db.models.fields.CharField",
  337. [],
  338. {"max_length": "50", "null": "True", "blank": "True"},
  339. ),
  340. "music": (
  341. "django.db.models.fields.CharField",
  342. [],
  343. {"max_length": "200", "null": "True", "blank": "True"},
  344. ),
  345. "producer": (
  346. "django.db.models.fields.CharField",
  347. [],
  348. {"max_length": "200", "null": "True", "blank": "True"},
  349. ),
  350. "region": (
  351. "django.db.models.fields.CharField",
  352. [],
  353. {"max_length": "50", "null": "True", "blank": "True"},
  354. ),
  355. "runtime_minutes": (
  356. "django.db.models.fields.IntegerField",
  357. [],
  358. {"null": "True", "blank": "True"},
  359. ),
  360. "sound": (
  361. "django.db.models.fields.CharField",
  362. [],
  363. {"max_length": "50", "null": "True", "blank": "True"},
  364. ),
  365. },
  366. "catalog.person": {
  367. "Meta": {"object_name": "Person"},
  368. "created": (
  369. "django.db.models.fields.DateTimeField",
  370. [],
  371. {"auto_now_add": "True", "blank": "True"},
  372. ),
  373. "created_by": (
  374. "django.db.models.fields.related.ForeignKey",
  375. [],
  376. {"related_name": "'+'", "to": "orm['auth.User']"},
  377. ),
  378. "deleted": (
  379. "django.db.models.fields.BooleanField",
  380. [],
  381. {"default": "False"},
  382. ),
  383. "description": (
  384. "django.db.models.fields.TextField",
  385. [],
  386. {"default": "''", "null": "True", "blank": "True"},
  387. ),
  388. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  389. "image": (
  390. "sorl.thumbnail.fields.ImageField",
  391. [],
  392. {"max_length": "100", "null": "True", "blank": "True"},
  393. ),
  394. "is_active": (
  395. "django.db.models.fields.BooleanField",
  396. [],
  397. {"default": "True"},
  398. ),
  399. "last_updated": (
  400. "django.db.models.fields.DateTimeField",
  401. [],
  402. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  403. ),
  404. "last_updated_by": (
  405. "django.db.models.fields.related.ForeignKey",
  406. [],
  407. {"related_name": "'+'", "to": "orm['auth.User']"},
  408. ),
  409. "name": ("django.db.models.fields.CharField", [], {"max_length": "60"}),
  410. "slug": (
  411. "django.db.models.fields.SlugField",
  412. [],
  413. {"unique": "True", "max_length": "60"},
  414. ),
  415. "title": (
  416. "django.db.models.fields.CharField",
  417. [],
  418. {"default": "''", "max_length": "60", "null": "True", "blank": "True"},
  419. ),
  420. },
  421. "catalog.subscription": {
  422. "Meta": {"object_name": "Subscription", "_ormbases": ["catalog.Item"]},
  423. "duration": ("django.db.models.fields.IntegerField", [], {}),
  424. "item_ptr": (
  425. "django.db.models.fields.related.OneToOneField",
  426. [],
  427. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  428. ),
  429. "shipping_method": (
  430. "django.db.models.fields.CharField",
  431. [],
  432. {"default": "u'REGULAR'", "max_length": "20"},
  433. ),
  434. "shipping_type": (
  435. "django.db.models.fields.CharField",
  436. [],
  437. {"default": "'INSTATE'", "max_length": "10"},
  438. ),
  439. },
  440. "catalog.zipcode": {
  441. "Meta": {"object_name": "ZipCode"},
  442. "city": (
  443. "django.db.models.fields.CharField",
  444. [],
  445. {"max_length": "64", "null": "True", "blank": "True"},
  446. ),
  447. "county": (
  448. "django.db.models.fields.CharField",
  449. [],
  450. {"max_length": "64", "null": "True", "blank": "True"},
  451. ),
  452. "created": (
  453. "django.db.models.fields.DateTimeField",
  454. [],
  455. {"auto_now_add": "True", "blank": "True"},
  456. ),
  457. "created_by": (
  458. "django.db.models.fields.related.ForeignKey",
  459. [],
  460. {"related_name": "'+'", "to": "orm['auth.User']"},
  461. ),
  462. "deleted": (
  463. "django.db.models.fields.BooleanField",
  464. [],
  465. {"default": "False"},
  466. ),
  467. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  468. "is_active": (
  469. "django.db.models.fields.BooleanField",
  470. [],
  471. {"default": "True"},
  472. ),
  473. "last_updated": (
  474. "django.db.models.fields.DateTimeField",
  475. [],
  476. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  477. ),
  478. "last_updated_by": (
  479. "django.db.models.fields.related.ForeignKey",
  480. [],
  481. {"related_name": "'+'", "to": "orm['auth.User']"},
  482. ),
  483. "state": (
  484. "django.db.models.fields.CharField",
  485. [],
  486. {"max_length": "2", "null": "True", "blank": "True"},
  487. ),
  488. "zipcode": (
  489. "django.db.models.fields.CharField",
  490. [],
  491. {"unique": "True", "max_length": "9"},
  492. ),
  493. },
  494. "contenttypes.contenttype": {
  495. "Meta": {
  496. "ordering": "('name',)",
  497. "unique_together": "(('app_label', 'model'),)",
  498. "object_name": "ContentType",
  499. "db_table": "'django_content_type'",
  500. },
  501. "app_label": (
  502. "django.db.models.fields.CharField",
  503. [],
  504. {"max_length": "100"},
  505. ),
  506. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  507. "model": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
  508. "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
  509. },
  510. }
  511. complete_apps = ["catalog"]