Guest User

Untitled

a guest
Mar 22nd, 2025
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.61 KB | None | 0 0
  1. # Generated by Django 5.1.7 on 2025-03-22 18:19
  2.  
  3. import django.core.validators
  4. from django.db import migrations, models
  5.  
  6.  
  7. class Migration(migrations.Migration):
  8.  
  9. initial = True
  10.  
  11. dependencies = []
  12.  
  13. operations = [
  14. migrations.CreateModel(
  15. name="Brand",
  16. fields=[
  17. (
  18. "id",
  19. models.BigAutoField(
  20. auto_created=True,
  21. primary_key=True,
  22. serialize=False,
  23. verbose_name="ID",
  24. ),
  25. ),
  26. ("name", models.CharField(max_length=64)),
  27. ("website", models.URLField()),
  28. ("created_at", models.DateTimeField()),
  29. ("updated_at", models.DateTimeField()),
  30. ],
  31. options={
  32. "verbose_name": "Brand",
  33. "verbose_name_plural": "Brands",
  34. "db_table": "brands",
  35. "managed": False,
  36. },
  37. ),
  38. migrations.CreateModel(
  39. name="BrandRelationship",
  40. fields=[
  41. (
  42. "id",
  43. models.BigAutoField(
  44. auto_created=True,
  45. primary_key=True,
  46. serialize=False,
  47. verbose_name="ID",
  48. ),
  49. ),
  50. ("order", models.IntegerField()),
  51. ("path", models.CharField(max_length=255)),
  52. ],
  53. options={
  54. "verbose_name": "Brand Relationship",
  55. "verbose_name_plural": "Brand Relationships",
  56. "db_table": "brands_rels",
  57. "managed": False,
  58. },
  59. ),
  60. migrations.CreateModel(
  61. name="CmsEvent",
  62. fields=[
  63. ("id", models.AutoField(primary_key=True, serialize=False)),
  64. (
  65. "event_uuid",
  66. models.CharField(
  67. editable=False,
  68. help_text="Read-only UUID for the event",
  69. max_length=36,
  70. unique=True,
  71. ),
  72. ),
  73. (
  74. "name",
  75. models.CharField(
  76. help_text="Enter the name of the event", max_length=128
  77. ),
  78. ),
  79. (
  80. "description",
  81. models.JSONField(
  82. default=dict,
  83. help_text="Provide a detailed description of the event",
  84. ),
  85. ),
  86. (
  87. "venue",
  88. models.CharField(
  89. blank=True,
  90. help_text="Enter the venue name (optional)",
  91. max_length=255,
  92. null=True,
  93. ),
  94. ),
  95. (
  96. "city",
  97. models.CharField(
  98. blank=True,
  99. help_text="Enter the city (optional)",
  100. max_length=255,
  101. null=True,
  102. ),
  103. ),
  104. (
  105. "locality",
  106. models.CharField(
  107. blank=True,
  108. help_text="Enter the locality (optional)",
  109. max_length=255,
  110. null=True,
  111. ),
  112. ),
  113. (
  114. "google_maps_link",
  115. models.URLField(
  116. help_text="Enter the Google Maps link for the event",
  117. validators=[django.core.validators.URLValidator()],
  118. ),
  119. ),
  120. (
  121. "google_form_link",
  122. models.URLField(
  123. help_text="Enter the Google Maps link for the event",
  124. validators=[django.core.validators.URLValidator()],
  125. ),
  126. ),
  127. (
  128. "payment_link",
  129. models.URLField(
  130. help_text="Enter the Google Maps link for the event",
  131. validators=[django.core.validators.URLValidator()],
  132. ),
  133. ),
  134. (
  135. "is_online_and_offline",
  136. models.BooleanField(
  137. default=False,
  138. help_text="Check this if an offline event is also streamed online.",
  139. ),
  140. ),
  141. (
  142. "start_date",
  143. models.DateTimeField(
  144. help_text="Event start date with time and timezone"
  145. ),
  146. ),
  147. (
  148. "end_date",
  149. models.DateTimeField(
  150. blank=True,
  151. help_text="Event end date with time and timezone",
  152. null=True,
  153. ),
  154. ),
  155. (
  156. "start_time",
  157. models.CharField(
  158. blank=True,
  159. help_text="Enter the start time (e.g., HH:MM)",
  160. max_length=10,
  161. null=True,
  162. ),
  163. ),
  164. (
  165. "end_time",
  166. models.CharField(
  167. blank=True,
  168. help_text="Enter the end time (e.g., HH:MM)",
  169. max_length=10,
  170. null=True,
  171. ),
  172. ),
  173. (
  174. "deleted",
  175. models.BooleanField(
  176. default=False, help_text="Mark this if the event is deleted."
  177. ),
  178. ),
  179. (
  180. "is_online",
  181. models.BooleanField(
  182. default=False,
  183. help_text="Check this if the event is an online event.",
  184. ),
  185. ),
  186. (
  187. "location",
  188. models.JSONField(
  189. default=dict,
  190. help_text="Provide structured location data for the event",
  191. ),
  192. ),
  193. (
  194. "price",
  195. models.IntegerField(
  196. help_text="Enter the price of the event",
  197. validators=[django.core.validators.MinValueValidator(0)],
  198. ),
  199. ),
  200. ],
  201. options={
  202. "verbose_name": "CMS Event",
  203. "verbose_name_plural": "CMS Events",
  204. "db_table": "events",
  205. "managed": False,
  206. },
  207. ),
  208. migrations.CreateModel(
  209. name="Form",
  210. fields=[
  211. ("id", models.AutoField(primary_key=True, serialize=False)),
  212. (
  213. "title",
  214. models.CharField(help_text="Enter the form title", max_length=255),
  215. ),
  216. (
  217. "submit_button_label",
  218. models.CharField(
  219. help_text="Enter the submit button label (e.g., Submit, Register)",
  220. max_length=255,
  221. ),
  222. ),
  223. (
  224. "confirmation_type",
  225. models.CharField(
  226. choices=[("message", "Message"), ("redirect", "Redirect")],
  227. help_text="Select the type of confirmation after form submission",
  228. max_length=10,
  229. ),
  230. ),
  231. (
  232. "confirmation_message",
  233. models.JSONField(
  234. blank=True,
  235. help_text="Provide a confirmation message in JSON format if confirmation type is 'Message'",
  236. null=True,
  237. ),
  238. ),
  239. (
  240. "redirect_url",
  241. models.URLField(
  242. blank=True,
  243. help_text="Provide a redirect URL if confirmation type is 'Redirect'",
  244. max_length=2048,
  245. null=True,
  246. ),
  247. ),
  248. (
  249. "updated_at",
  250. models.DateTimeField(
  251. auto_now=True,
  252. help_text="Timestamp when the form was last updated",
  253. ),
  254. ),
  255. (
  256. "created_at",
  257. models.DateTimeField(
  258. auto_now_add=True,
  259. help_text="Timestamp when the form was created",
  260. ),
  261. ),
  262. ],
  263. options={
  264. "verbose_name": "Form",
  265. "verbose_name_plural": "Forms",
  266. "db_table": "forms",
  267. "managed": False,
  268. },
  269. ),
  270. migrations.CreateModel(
  271. name="FormSubmission",
  272. fields=[
  273. ("id", models.AutoField(primary_key=True, serialize=False)),
  274. (
  275. "updated_at",
  276. models.DateTimeField(
  277. auto_now=True,
  278. help_text="Timestamp when the submission was last updated",
  279. ),
  280. ),
  281. (
  282. "created_at",
  283. models.DateTimeField(
  284. auto_now_add=True,
  285. help_text="Timestamp when the submission was created",
  286. ),
  287. ),
  288. ],
  289. options={
  290. "verbose_name": "Form Submission",
  291. "verbose_name_plural": "Form Submissions",
  292. "db_table": "form_submissions",
  293. "managed": False,
  294. },
  295. ),
  296. migrations.CreateModel(
  297. name="Media",
  298. fields=[
  299. (
  300. "id",
  301. models.BigAutoField(
  302. auto_created=True,
  303. primary_key=True,
  304. serialize=False,
  305. verbose_name="ID",
  306. ),
  307. ),
  308. ("alt", models.CharField(max_length=255)),
  309. ("prefix", models.CharField(max_length=255)),
  310. ("updated_at", models.DateTimeField(auto_now=True)),
  311. ("created_at", models.DateTimeField(auto_now_add=True)),
  312. ("url", models.URLField(blank=True, null=True)),
  313. (
  314. "thumbnail_url",
  315. models.URLField(blank=True, db_column="thumbnail_u_r_l", null=True),
  316. ),
  317. ("filename", models.CharField(max_length=255)),
  318. (
  319. "mimetype",
  320. models.CharField(
  321. blank=True, db_column="mime_type", max_length=128, null=True
  322. ),
  323. ),
  324. (
  325. "filesize",
  326. models.DecimalField(
  327. blank=True, decimal_places=2, max_digits=20, null=True
  328. ),
  329. ),
  330. (
  331. "width",
  332. models.DecimalField(
  333. blank=True, decimal_places=2, max_digits=10, null=True
  334. ),
  335. ),
  336. (
  337. "height",
  338. models.DecimalField(
  339. blank=True, decimal_places=2, max_digits=10, null=True
  340. ),
  341. ),
  342. (
  343. "focal_x",
  344. models.DecimalField(
  345. blank=True, decimal_places=2, max_digits=5, null=True
  346. ),
  347. ),
  348. (
  349. "focal_y",
  350. models.DecimalField(
  351. blank=True, decimal_places=2, max_digits=5, null=True
  352. ),
  353. ),
  354. ],
  355. options={
  356. "verbose_name": "Media",
  357. "verbose_name_plural": "Media",
  358. "db_table": "media",
  359. "managed": False,
  360. },
  361. ),
  362. migrations.CreateModel(
  363. name="ShoppingCategory",
  364. fields=[
  365. (
  366. "id",
  367. models.BigAutoField(
  368. auto_created=True,
  369. primary_key=True,
  370. serialize=False,
  371. verbose_name="ID",
  372. ),
  373. ),
  374. ("name", models.CharField(max_length=64, unique=True)),
  375. ],
  376. options={
  377. "verbose_name": "Shopping Category",
  378. "verbose_name_plural": "Shopping Categories",
  379. "db_table": "shopping_categories",
  380. "managed": False,
  381. },
  382. ),
  383. ]
  384.  
Advertisement
Add Comment
Please, Sign In to add comment