0013_auto.py 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  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. # Adding M2M table for field new_authors on 'Book'
  9. db.create_table(
  10. "catalog_book_new_authors",
  11. (
  12. (
  13. "id",
  14. models.AutoField(
  15. verbose_name="ID", primary_key=True, auto_created=True
  16. ),
  17. ),
  18. ("book", models.ForeignKey(orm["catalog.book"], null=False)),
  19. ("person", models.ForeignKey(orm["catalog.person"], null=False)),
  20. ),
  21. )
  22. db.create_unique("catalog_book_new_authors", ["book_id", "person_id"])
  23. def backwards(self, orm):
  24. # Removing M2M table for field new_authors on 'Book'
  25. db.delete_table("catalog_book_new_authors")
  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. "author_image": (
  135. "sorl.thumbnail.fields.ImageField",
  136. [],
  137. {"max_length": "100", "null": "True", "blank": "True"},
  138. ),
  139. "authors": (
  140. "django.db.models.fields.CharField",
  141. [],
  142. {"max_length": "200", "null": "True", "blank": "True"},
  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. "new_authors": (
  190. "django.db.models.fields.related.ManyToManyField",
  191. [],
  192. {
  193. "symmetrical": "False",
  194. "to": "orm['catalog.Person']",
  195. "null": "True",
  196. "blank": "True",
  197. },
  198. ),
  199. "pages": (
  200. "django.db.models.fields.IntegerField",
  201. [],
  202. {"null": "True", "blank": "True"},
  203. ),
  204. "printer": (
  205. "django.db.models.fields.CharField",
  206. [],
  207. {"max_length": "200", "null": "True", "blank": "True"},
  208. ),
  209. "publish_date": (
  210. "django.db.models.fields.CharField",
  211. [],
  212. {"max_length": "20", "null": "True", "blank": "True"},
  213. ),
  214. "publisher": (
  215. "django.db.models.fields.CharField",
  216. [],
  217. {"max_length": "200", "null": "True", "blank": "True"},
  218. ),
  219. "subtitle": (
  220. "django.db.models.fields.CharField",
  221. [],
  222. {"max_length": "100", "null": "True", "blank": "True"},
  223. ),
  224. },
  225. "catalog.item": {
  226. "Meta": {"object_name": "Item"},
  227. "created": (
  228. "django.db.models.fields.DateTimeField",
  229. [],
  230. {"auto_now_add": "True", "blank": "True"},
  231. ),
  232. "created_by": (
  233. "django.db.models.fields.related.ForeignKey",
  234. [],
  235. {"related_name": "'+'", "to": "orm['auth.User']"},
  236. ),
  237. "deleted": (
  238. "django.db.models.fields.BooleanField",
  239. [],
  240. {"default": "False"},
  241. ),
  242. "featured": (
  243. "django.db.models.fields.BooleanField",
  244. [],
  245. {"default": "False"},
  246. ),
  247. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  248. "image": (
  249. "sorl.thumbnail.fields.ImageField",
  250. [],
  251. {"max_length": "100", "null": "True", "blank": "True"},
  252. ),
  253. "is_active": (
  254. "django.db.models.fields.BooleanField",
  255. [],
  256. {"default": "True"},
  257. ),
  258. "last_updated": (
  259. "django.db.models.fields.DateTimeField",
  260. [],
  261. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  262. ),
  263. "last_updated_by": (
  264. "django.db.models.fields.related.ForeignKey",
  265. [],
  266. {"related_name": "'+'", "to": "orm['auth.User']"},
  267. ),
  268. "long_description": (
  269. "django.db.models.fields.TextField",
  270. [],
  271. {"null": "True", "blank": "True"},
  272. ),
  273. "price": (
  274. "django.db.models.fields.DecimalField",
  275. [],
  276. {"max_digits": "7", "decimal_places": "2"},
  277. ),
  278. "shipping_cost": (
  279. "django.db.models.fields.DecimalField",
  280. [],
  281. {"max_digits": "7", "decimal_places": "2"},
  282. ),
  283. "shipping_cost_multiple": (
  284. "django.db.models.fields.DecimalField",
  285. [],
  286. {"max_digits": "7", "decimal_places": "2"},
  287. ),
  288. "sku": (
  289. "django.db.models.fields.SlugField",
  290. [],
  291. {"unique": "True", "max_length": "20"},
  292. ),
  293. "subclass_type": (
  294. "django.db.models.fields.CharField",
  295. [],
  296. {"max_length": "200"},
  297. ),
  298. "synopsis": (
  299. "django.db.models.fields.CharField",
  300. [],
  301. {"max_length": "200", "null": "True", "blank": "True"},
  302. ),
  303. "tax_free": (
  304. "django.db.models.fields.BooleanField",
  305. [],
  306. {"default": "False"},
  307. ),
  308. "title": ("django.db.models.fields.CharField", [], {"max_length": "50"}),
  309. },
  310. "catalog.map": {
  311. "Meta": {"object_name": "Map", "_ormbases": ["catalog.Item"]},
  312. "dimensions": (
  313. "django.db.models.fields.CharField",
  314. [],
  315. {"max_length": "20", "null": "True", "blank": "True"},
  316. ),
  317. "item_ptr": (
  318. "django.db.models.fields.related.OneToOneField",
  319. [],
  320. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  321. ),
  322. },
  323. "catalog.movie": {
  324. "Meta": {"object_name": "Movie", "_ormbases": ["catalog.Item"]},
  325. "captioning": (
  326. "django.db.models.fields.CharField",
  327. [],
  328. {"max_length": "50", "null": "True", "blank": "True"},
  329. ),
  330. "format": (
  331. "django.db.models.fields.CharField",
  332. [],
  333. {"max_length": "20", "null": "True", "blank": "True"},
  334. ),
  335. "genre": (
  336. "django.db.models.fields.CharField",
  337. [],
  338. {"max_length": "100", "null": "True", "blank": "True"},
  339. ),
  340. "item_ptr": (
  341. "django.db.models.fields.related.OneToOneField",
  342. [],
  343. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  344. ),
  345. "language": (
  346. "django.db.models.fields.CharField",
  347. [],
  348. {"max_length": "50", "null": "True", "blank": "True"},
  349. ),
  350. "music": (
  351. "django.db.models.fields.CharField",
  352. [],
  353. {"max_length": "200", "null": "True", "blank": "True"},
  354. ),
  355. "producer": (
  356. "django.db.models.fields.CharField",
  357. [],
  358. {"max_length": "200", "null": "True", "blank": "True"},
  359. ),
  360. "region": (
  361. "django.db.models.fields.CharField",
  362. [],
  363. {"max_length": "50", "null": "True", "blank": "True"},
  364. ),
  365. "runtime_minutes": (
  366. "django.db.models.fields.IntegerField",
  367. [],
  368. {"null": "True", "blank": "True"},
  369. ),
  370. "sound": (
  371. "django.db.models.fields.CharField",
  372. [],
  373. {"max_length": "50", "null": "True", "blank": "True"},
  374. ),
  375. },
  376. "catalog.person": {
  377. "Meta": {"object_name": "Person"},
  378. "created": (
  379. "django.db.models.fields.DateTimeField",
  380. [],
  381. {"auto_now_add": "True", "blank": "True"},
  382. ),
  383. "created_by": (
  384. "django.db.models.fields.related.ForeignKey",
  385. [],
  386. {"related_name": "'+'", "to": "orm['auth.User']"},
  387. ),
  388. "deleted": (
  389. "django.db.models.fields.BooleanField",
  390. [],
  391. {"default": "False"},
  392. ),
  393. "description": (
  394. "django.db.models.fields.TextField",
  395. [],
  396. {"default": "''", "null": "True", "blank": "True"},
  397. ),
  398. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  399. "image": (
  400. "sorl.thumbnail.fields.ImageField",
  401. [],
  402. {"max_length": "100", "null": "True", "blank": "True"},
  403. ),
  404. "is_active": (
  405. "django.db.models.fields.BooleanField",
  406. [],
  407. {"default": "True"},
  408. ),
  409. "last_updated": (
  410. "django.db.models.fields.DateTimeField",
  411. [],
  412. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  413. ),
  414. "last_updated_by": (
  415. "django.db.models.fields.related.ForeignKey",
  416. [],
  417. {"related_name": "'+'", "to": "orm['auth.User']"},
  418. ),
  419. "name": ("django.db.models.fields.CharField", [], {"max_length": "60"}),
  420. "slug": (
  421. "django.db.models.fields.SlugField",
  422. [],
  423. {"unique": "True", "max_length": "60"},
  424. ),
  425. "title": (
  426. "django.db.models.fields.CharField",
  427. [],
  428. {"default": "''", "max_length": "60", "null": "True", "blank": "True"},
  429. ),
  430. },
  431. "catalog.subscription": {
  432. "Meta": {"object_name": "Subscription", "_ormbases": ["catalog.Item"]},
  433. "duration": ("django.db.models.fields.IntegerField", [], {}),
  434. "item_ptr": (
  435. "django.db.models.fields.related.OneToOneField",
  436. [],
  437. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  438. ),
  439. "shipping_method": (
  440. "django.db.models.fields.CharField",
  441. [],
  442. {"default": "u'REGULAR'", "max_length": "20"},
  443. ),
  444. "shipping_type": (
  445. "django.db.models.fields.CharField",
  446. [],
  447. {"default": "'INSTATE'", "max_length": "10"},
  448. ),
  449. },
  450. "catalog.zipcode": {
  451. "Meta": {"object_name": "ZipCode"},
  452. "city": (
  453. "django.db.models.fields.CharField",
  454. [],
  455. {"max_length": "64", "null": "True", "blank": "True"},
  456. ),
  457. "county": (
  458. "django.db.models.fields.CharField",
  459. [],
  460. {"max_length": "64", "null": "True", "blank": "True"},
  461. ),
  462. "created": (
  463. "django.db.models.fields.DateTimeField",
  464. [],
  465. {"auto_now_add": "True", "blank": "True"},
  466. ),
  467. "created_by": (
  468. "django.db.models.fields.related.ForeignKey",
  469. [],
  470. {"related_name": "'+'", "to": "orm['auth.User']"},
  471. ),
  472. "deleted": (
  473. "django.db.models.fields.BooleanField",
  474. [],
  475. {"default": "False"},
  476. ),
  477. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  478. "is_active": (
  479. "django.db.models.fields.BooleanField",
  480. [],
  481. {"default": "True"},
  482. ),
  483. "last_updated": (
  484. "django.db.models.fields.DateTimeField",
  485. [],
  486. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  487. ),
  488. "last_updated_by": (
  489. "django.db.models.fields.related.ForeignKey",
  490. [],
  491. {"related_name": "'+'", "to": "orm['auth.User']"},
  492. ),
  493. "state": (
  494. "django.db.models.fields.CharField",
  495. [],
  496. {"max_length": "2", "null": "True", "blank": "True"},
  497. ),
  498. "zipcode": (
  499. "django.db.models.fields.CharField",
  500. [],
  501. {"unique": "True", "max_length": "9"},
  502. ),
  503. },
  504. "contenttypes.contenttype": {
  505. "Meta": {
  506. "ordering": "('name',)",
  507. "unique_together": "(('app_label', 'model'),)",
  508. "object_name": "ContentType",
  509. "db_table": "'django_content_type'",
  510. },
  511. "app_label": (
  512. "django.db.models.fields.CharField",
  513. [],
  514. {"max_length": "100"},
  515. ),
  516. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  517. "model": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
  518. "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
  519. },
  520. }
  521. complete_apps = ["catalog"]