0015_auto.py 19 KB

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