You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

228 lines
9.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # Generated by Django 3.2.11 on 2022-02-04 02:01
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  8. ("contenttypes", "0002_remove_content_type_name"),
  9. ("projects", "0001_initial"),
  10. ]
  11. operations = [
  12. migrations.SeparateDatabaseAndState(
  13. state_operations=[
  14. migrations.CreateModel(
  15. name="Project",
  16. fields=[
  17. (
  18. "id",
  19. models.BigAutoField(
  20. auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
  21. ),
  22. ),
  23. ("name", models.CharField(max_length=100)),
  24. ("description", models.TextField(default="")),
  25. ("guideline", models.TextField(blank=True, default="")),
  26. ("created_at", models.DateTimeField(auto_now_add=True)),
  27. ("updated_at", models.DateTimeField(auto_now=True)),
  28. (
  29. "project_type",
  30. models.CharField(
  31. choices=[
  32. ("DocumentClassification", "document classification"),
  33. ("SequenceLabeling", "sequence labeling"),
  34. ("Seq2seq", "sequence to sequence"),
  35. ("IntentDetectionAndSlotFilling", "intent detection and slot filling"),
  36. ("Speech2text", "speech to text"),
  37. ("ImageClassification", "image classification"),
  38. ],
  39. max_length=30,
  40. ),
  41. ),
  42. ("random_order", models.BooleanField(default=False)),
  43. ("collaborative_annotation", models.BooleanField(default=False)),
  44. ("single_class_classification", models.BooleanField(default=False)),
  45. (
  46. "created_by",
  47. models.ForeignKey(
  48. null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL
  49. ),
  50. ),
  51. (
  52. "polymorphic_ctype",
  53. models.ForeignKey(
  54. editable=False,
  55. null=True,
  56. on_delete=django.db.models.deletion.CASCADE,
  57. related_name="polymorphic_projects.project_set+",
  58. to="contenttypes.contenttype",
  59. ),
  60. ),
  61. ],
  62. options={
  63. "abstract": False,
  64. "base_manager_name": "objects",
  65. },
  66. ),
  67. migrations.CreateModel(
  68. name="ImageClassificationProject",
  69. fields=[
  70. (
  71. "project_ptr",
  72. models.OneToOneField(
  73. auto_created=True,
  74. on_delete=django.db.models.deletion.CASCADE,
  75. parent_link=True,
  76. primary_key=True,
  77. serialize=False,
  78. to="projects.project",
  79. ),
  80. ),
  81. ],
  82. options={
  83. "abstract": False,
  84. "base_manager_name": "objects",
  85. },
  86. bases=("projects.project",),
  87. ),
  88. migrations.CreateModel(
  89. name="IntentDetectionAndSlotFillingProject",
  90. fields=[
  91. (
  92. "project_ptr",
  93. models.OneToOneField(
  94. auto_created=True,
  95. on_delete=django.db.models.deletion.CASCADE,
  96. parent_link=True,
  97. primary_key=True,
  98. serialize=False,
  99. to="projects.project",
  100. ),
  101. ),
  102. ],
  103. options={
  104. "abstract": False,
  105. "base_manager_name": "objects",
  106. },
  107. bases=("projects.project",),
  108. ),
  109. migrations.CreateModel(
  110. name="Seq2seqProject",
  111. fields=[
  112. (
  113. "project_ptr",
  114. models.OneToOneField(
  115. auto_created=True,
  116. on_delete=django.db.models.deletion.CASCADE,
  117. parent_link=True,
  118. primary_key=True,
  119. serialize=False,
  120. to="projects.project",
  121. ),
  122. ),
  123. ],
  124. options={
  125. "abstract": False,
  126. "base_manager_name": "objects",
  127. },
  128. bases=("projects.project",),
  129. ),
  130. migrations.CreateModel(
  131. name="SequenceLabelingProject",
  132. fields=[
  133. (
  134. "project_ptr",
  135. models.OneToOneField(
  136. auto_created=True,
  137. on_delete=django.db.models.deletion.CASCADE,
  138. parent_link=True,
  139. primary_key=True,
  140. serialize=False,
  141. to="projects.project",
  142. ),
  143. ),
  144. ("allow_overlapping", models.BooleanField(default=False)),
  145. ("grapheme_mode", models.BooleanField(default=False)),
  146. ],
  147. options={
  148. "abstract": False,
  149. "base_manager_name": "objects",
  150. },
  151. bases=("projects.project",),
  152. ),
  153. migrations.CreateModel(
  154. name="Speech2textProject",
  155. fields=[
  156. (
  157. "project_ptr",
  158. models.OneToOneField(
  159. auto_created=True,
  160. on_delete=django.db.models.deletion.CASCADE,
  161. parent_link=True,
  162. primary_key=True,
  163. serialize=False,
  164. to="projects.project",
  165. ),
  166. ),
  167. ],
  168. options={
  169. "abstract": False,
  170. "base_manager_name": "objects",
  171. },
  172. bases=("projects.project",),
  173. ),
  174. migrations.CreateModel(
  175. name="TextClassificationProject",
  176. fields=[
  177. (
  178. "project_ptr",
  179. models.OneToOneField(
  180. auto_created=True,
  181. on_delete=django.db.models.deletion.CASCADE,
  182. parent_link=True,
  183. primary_key=True,
  184. serialize=False,
  185. to="projects.project",
  186. ),
  187. ),
  188. ],
  189. options={
  190. "abstract": False,
  191. "base_manager_name": "objects",
  192. },
  193. bases=("projects.project",),
  194. ),
  195. migrations.CreateModel(
  196. name="Tag",
  197. fields=[
  198. (
  199. "id",
  200. models.BigAutoField(
  201. auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
  202. ),
  203. ),
  204. ("text", models.TextField()),
  205. (
  206. "project",
  207. models.ForeignKey(
  208. on_delete=django.db.models.deletion.CASCADE, related_name="tags", to="projects.project"
  209. ),
  210. ),
  211. ],
  212. ),
  213. migrations.AlterField(
  214. model_name="member",
  215. name="project",
  216. field=models.ForeignKey(
  217. on_delete=django.db.models.deletion.CASCADE, related_name="role_mappings", to="projects.project"
  218. ),
  219. ),
  220. ],
  221. database_operations=[],
  222. )
  223. ]