Coverage for django_napse/core/migrations/0001_initial.py: 100%
10 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
1# Generated by Django 4.2.5 on 2023-10-09 15:35
3import datetime
4import uuid
6import django.db.models.deletion
7from django.db import migrations, models
9import django_napse.utils.constants
10import django_napse.utils.findable_class
13class Migration(migrations.Migration):
14 initial = True
16 dependencies = []
18 operations = [
19 migrations.CreateModel(
20 name="Architecture",
21 fields=[
22 (
23 "id",
24 models.BigAutoField(
25 auto_created=True,
26 primary_key=True,
27 serialize=False,
28 verbose_name="ID",
29 ),
30 ),
31 ],
32 bases=(models.Model, django_napse.utils.findable_class.FindableClass),
33 ),
34 migrations.CreateModel(
35 name="Bot",
36 fields=[
37 (
38 "id",
39 models.BigAutoField(
40 auto_created=True,
41 primary_key=True,
42 serialize=False,
43 verbose_name="ID",
44 ),
45 ),
46 (
47 "uuid",
48 models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
49 ),
50 ("name", models.CharField(default="Bot", max_length=100)),
51 ("created_at", models.DateTimeField(auto_now_add=True)),
52 ("active", models.BooleanField(default=True)),
53 ],
54 ),
55 migrations.CreateModel(
56 name="BotConfig",
57 fields=[
58 (
59 "id",
60 models.BigAutoField(
61 auto_created=True,
62 primary_key=True,
63 serialize=False,
64 verbose_name="ID",
65 ),
66 ),
67 (
68 "uuid",
69 models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
70 ),
71 ("immutable", models.BooleanField(default=False)),
72 ],
73 bases=(models.Model, django_napse.utils.findable_class.FindableClass),
74 ),
75 migrations.CreateModel(
76 name="Cluster",
77 fields=[
78 (
79 "id",
80 models.BigAutoField(
81 auto_created=True,
82 primary_key=True,
83 serialize=False,
84 verbose_name="ID",
85 ),
86 ),
87 ("share", models.FloatField()),
88 ("breakpoint", models.FloatField()),
89 ("autoscale", models.BooleanField()),
90 ],
91 ),
92 migrations.CreateModel(
93 name="Connection",
94 fields=[
95 (
96 "id",
97 models.BigAutoField(
98 auto_created=True,
99 primary_key=True,
100 serialize=False,
101 verbose_name="ID",
102 ),
103 ),
104 ("created_at", models.DateTimeField(auto_now_add=True)),
105 (
106 "bot",
107 models.ForeignKey(
108 on_delete=django.db.models.deletion.CASCADE,
109 related_name="connections",
110 to="django_napse_core.bot",
111 ),
112 ),
113 ],
114 ),
115 migrations.CreateModel(
116 name="Controller",
117 fields=[
118 (
119 "id",
120 models.BigAutoField(
121 auto_created=True,
122 primary_key=True,
123 serialize=False,
124 verbose_name="ID",
125 ),
126 ),
127 ("pair", models.CharField(max_length=10)),
128 ("base", models.CharField(max_length=10)),
129 ("quote", models.CharField(max_length=10)),
130 ("interval", models.CharField(max_length=10)),
131 ("min_notional", models.FloatField(null=True)),
132 ("min_trade", models.FloatField(null=True)),
133 ("lot_size", models.IntegerField(null=True)),
134 ("price", models.FloatField(null=True)),
135 ("last_price_update", models.DateTimeField(null=True)),
136 ("last_settings_update", models.DateTimeField(null=True)),
137 ],
138 ),
139 migrations.CreateModel(
140 name="Exchange",
141 fields=[
142 (
143 "id",
144 models.BigAutoField(
145 auto_created=True,
146 primary_key=True,
147 serialize=False,
148 verbose_name="ID",
149 ),
150 ),
151 ("name", models.CharField(max_length=200, unique=True)),
152 ("description", models.TextField()),
153 ],
154 ),
155 migrations.CreateModel(
156 name="ExchangeAccount",
157 fields=[
158 (
159 "id",
160 models.BigAutoField(
161 auto_created=True,
162 primary_key=True,
163 serialize=False,
164 verbose_name="ID",
165 ),
166 ),
167 (
168 "uuid",
169 models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
170 ),
171 ("name", models.CharField(max_length=200, unique=True)),
172 ("testing", models.BooleanField(default=True)),
173 ("description", models.TextField()),
174 ("created_at", models.DateTimeField(auto_now_add=True)),
175 (
176 "exchange",
177 models.ForeignKey(
178 on_delete=django.db.models.deletion.CASCADE,
179 related_name="accounts",
180 to="django_napse_core.exchange",
181 ),
182 ),
183 ],
184 bases=(models.Model, django_napse.utils.findable_class.FindableClass),
185 ),
186 migrations.CreateModel(
187 name="Modification",
188 fields=[
189 (
190 "id",
191 models.BigAutoField(
192 auto_created=True,
193 primary_key=True,
194 serialize=False,
195 verbose_name="ID",
196 ),
197 ),
198 (
199 "status",
200 models.CharField(
201 default=django_napse.utils.constants.MODIFICATION_STATUS["PENDING"],
202 max_length=15,
203 ),
204 ),
205 ("created_at", models.DateTimeField(auto_now_add=True)),
206 ("ignore_failed_order", models.BooleanField(default=False)),
207 ("key", models.CharField(max_length=100)),
208 ("value", models.CharField(max_length=100)),
209 ("target_type", models.CharField(max_length=100)),
210 ],
211 bases=(models.Model, django_napse.utils.findable_class.FindableClass),
212 ),
213 migrations.CreateModel(
214 name="Plugin",
215 fields=[
216 (
217 "id",
218 models.BigAutoField(
219 auto_created=True,
220 primary_key=True,
221 serialize=False,
222 verbose_name="ID",
223 ),
224 ),
225 ("category", models.CharField(max_length=255)),
226 ],
227 bases=(models.Model, django_napse.utils.findable_class.FindableClass),
228 ),
229 migrations.CreateModel(
230 name="Strategy",
231 fields=[
232 (
233 "id",
234 models.BigAutoField(
235 auto_created=True,
236 primary_key=True,
237 serialize=False,
238 verbose_name="ID",
239 ),
240 ),
241 (
242 "architecture",
243 models.OneToOneField(
244 on_delete=django.db.models.deletion.CASCADE,
245 related_name="strategy",
246 to="django_napse_core.architecture",
247 ),
248 ),
249 (
250 "config",
251 models.OneToOneField(
252 on_delete=django.db.models.deletion.CASCADE,
253 related_name="strategy",
254 to="django_napse_core.botconfig",
255 ),
256 ),
257 ],
258 bases=(models.Model, django_napse.utils.findable_class.FindableClass),
259 ),
260 migrations.CreateModel(
261 name="Wallet",
262 fields=[
263 (
264 "id",
265 models.BigAutoField(
266 auto_created=True,
267 primary_key=True,
268 serialize=False,
269 verbose_name="ID",
270 ),
271 ),
272 ("title", models.CharField(default="Wallet", max_length=255)),
273 ("locked", models.BooleanField(default=False)),
274 ("created_at", models.DateTimeField(auto_now_add=True)),
275 ],
276 bases=(models.Model, django_napse.utils.findable_class.FindableClass),
277 ),
278 migrations.CreateModel(
279 name="ArchitectureModification",
280 fields=[
281 (
282 "modification_ptr",
283 models.OneToOneField(
284 auto_created=True,
285 on_delete=django.db.models.deletion.CASCADE,
286 parent_link=True,
287 primary_key=True,
288 serialize=False,
289 to="django_napse_core.modification",
290 ),
291 ),
292 ],
293 bases=("django_napse_core.modification",),
294 ),
295 migrations.CreateModel(
296 name="DCABotConfig",
297 fields=[
298 (
299 "botconfig_ptr",
300 models.OneToOneField(
301 auto_created=True,
302 on_delete=django.db.models.deletion.CASCADE,
303 parent_link=True,
304 primary_key=True,
305 serialize=False,
306 to="django_napse_core.botconfig",
307 ),
308 ),
309 ("setting_timeframe", models.DurationField()),
310 ],
311 bases=("django_napse_core.botconfig",),
312 ),
313 migrations.CreateModel(
314 name="DCAStrategy",
315 fields=[
316 (
317 "strategy_ptr",
318 models.OneToOneField(
319 auto_created=True,
320 on_delete=django.db.models.deletion.CASCADE,
321 parent_link=True,
322 primary_key=True,
323 serialize=False,
324 to="django_napse_core.strategy",
325 ),
326 ),
327 ("variable_last_buy_date", models.DateTimeField(blank=True, null=True)),
328 ],
329 bases=("django_napse_core.strategy",),
330 ),
331 migrations.CreateModel(
332 name="EmptyBotConfig",
333 fields=[
334 (
335 "botconfig_ptr",
336 models.OneToOneField(
337 auto_created=True,
338 on_delete=django.db.models.deletion.CASCADE,
339 parent_link=True,
340 primary_key=True,
341 serialize=False,
342 to="django_napse_core.botconfig",
343 ),
344 ),
345 ("setting_empty", models.BooleanField()),
346 ],
347 bases=("django_napse_core.botconfig",),
348 ),
349 migrations.CreateModel(
350 name="EmptyStrategy",
351 fields=[
352 (
353 "strategy_ptr",
354 models.OneToOneField(
355 auto_created=True,
356 on_delete=django.db.models.deletion.CASCADE,
357 parent_link=True,
358 primary_key=True,
359 serialize=False,
360 to="django_napse_core.strategy",
361 ),
362 ),
363 ],
364 bases=("django_napse_core.strategy",),
365 ),
366 migrations.CreateModel(
367 name="LBOPlugin",
368 fields=[
369 (
370 "plugin_ptr",
371 models.OneToOneField(
372 auto_created=True,
373 on_delete=django.db.models.deletion.CASCADE,
374 parent_link=True,
375 primary_key=True,
376 serialize=False,
377 to="django_napse_core.plugin",
378 ),
379 ),
380 ],
381 bases=("django_napse_core.plugin",),
382 ),
383 migrations.CreateModel(
384 name="MBPPlugin",
385 fields=[
386 (
387 "plugin_ptr",
388 models.OneToOneField(
389 auto_created=True,
390 on_delete=django.db.models.deletion.CASCADE,
391 parent_link=True,
392 primary_key=True,
393 serialize=False,
394 to="django_napse_core.plugin",
395 ),
396 ),
397 ],
398 bases=("django_napse_core.plugin",),
399 ),
400 migrations.CreateModel(
401 name="SBVPlugin",
402 fields=[
403 (
404 "plugin_ptr",
405 models.OneToOneField(
406 auto_created=True,
407 on_delete=django.db.models.deletion.CASCADE,
408 parent_link=True,
409 primary_key=True,
410 serialize=False,
411 to="django_napse_core.plugin",
412 ),
413 ),
414 ],
415 bases=("django_napse_core.plugin",),
416 ),
417 migrations.CreateModel(
418 name="StrategyModification",
419 fields=[
420 (
421 "modification_ptr",
422 models.OneToOneField(
423 auto_created=True,
424 on_delete=django.db.models.deletion.CASCADE,
425 parent_link=True,
426 primary_key=True,
427 serialize=False,
428 to="django_napse_core.modification",
429 ),
430 ),
431 ],
432 bases=("django_napse_core.modification",),
433 ),
434 migrations.CreateModel(
435 name="TurboDCABotConfig",
436 fields=[
437 (
438 "botconfig_ptr",
439 models.OneToOneField(
440 auto_created=True,
441 on_delete=django.db.models.deletion.CASCADE,
442 parent_link=True,
443 primary_key=True,
444 serialize=False,
445 to="django_napse_core.botconfig",
446 ),
447 ),
448 ("setting_timeframe", models.DurationField()),
449 ("setting_percentage", models.FloatField()),
450 ],
451 bases=("django_napse_core.botconfig",),
452 ),
453 migrations.CreateModel(
454 name="TurboDCAStrategy",
455 fields=[
456 (
457 "strategy_ptr",
458 models.OneToOneField(
459 auto_created=True,
460 on_delete=django.db.models.deletion.CASCADE,
461 parent_link=True,
462 primary_key=True,
463 serialize=False,
464 to="django_napse_core.strategy",
465 ),
466 ),
467 ("variable_last_buy_date", models.DateTimeField(blank=True, null=True)),
468 ],
469 bases=("django_napse_core.strategy",),
470 ),
471 migrations.CreateModel(
472 name="Transaction",
473 fields=[
474 (
475 "id",
476 models.BigAutoField(
477 auto_created=True,
478 primary_key=True,
479 serialize=False,
480 verbose_name="ID",
481 ),
482 ),
483 ("amount", models.FloatField()),
484 ("ticker", models.CharField(max_length=10)),
485 (
486 "transaction_type",
487 models.CharField(default="TRANSFER", max_length=20),
488 ),
489 ("created_at", models.DateTimeField(auto_now_add=True)),
490 (
491 "from_wallet",
492 models.ForeignKey(
493 on_delete=django.db.models.deletion.CASCADE,
494 related_name="transactions_from",
495 to="django_napse_core.wallet",
496 ),
497 ),
498 (
499 "to_wallet",
500 models.ForeignKey(
501 on_delete=django.db.models.deletion.CASCADE,
502 related_name="transactions_to",
503 to="django_napse_core.wallet",
504 ),
505 ),
506 ],
507 ),
508 migrations.AddField(
509 model_name="plugin",
510 name="strategy",
511 field=models.ForeignKey(
512 on_delete=django.db.models.deletion.CASCADE,
513 related_name="plugins",
514 to="django_napse_core.strategy",
515 ),
516 ),
517 migrations.CreateModel(
518 name="OrderBatch",
519 fields=[
520 (
521 "id",
522 models.BigAutoField(
523 auto_created=True,
524 primary_key=True,
525 serialize=False,
526 verbose_name="ID",
527 ),
528 ),
529 (
530 "status",
531 models.CharField(
532 default=django_napse.utils.constants.ORDER_STATUS["PENDING"],
533 max_length=15,
534 ),
535 ),
536 (
537 "controller",
538 models.ForeignKey(
539 on_delete=django.db.models.deletion.CASCADE,
540 related_name="order_batches",
541 to="django_napse_core.controller",
542 ),
543 ),
544 ],
545 ),
546 migrations.CreateModel(
547 name="Order",
548 fields=[
549 (
550 "id",
551 models.BigAutoField(
552 auto_created=True,
553 primary_key=True,
554 serialize=False,
555 verbose_name="ID",
556 ),
557 ),
558 ("price", models.FloatField()),
559 ("pair", models.CharField(max_length=10)),
560 ("side", models.CharField(max_length=10)),
561 ("completed", models.BooleanField(default=False)),
562 ("asked_for_amount", models.FloatField()),
563 ("asked_for_ticker", models.CharField(max_length=10)),
564 ("debited_amount", models.FloatField(default=0)),
565 ("batch_share", models.FloatField(default=0)),
566 ("exit_base_amount", models.FloatField(default=0)),
567 ("exit_quote_amount", models.FloatField(default=0)),
568 ("fees", models.FloatField(default=0)),
569 ("fee_ticker", models.CharField(blank=True, max_length=10)),
570 ("created_at", models.DateTimeField(auto_now_add=True)),
571 (
572 "batch",
573 models.ForeignKey(
574 on_delete=django.db.models.deletion.CASCADE,
575 related_name="orders",
576 to="django_napse_core.orderbatch",
577 ),
578 ),
579 (
580 "connection",
581 models.ForeignKey(
582 on_delete=django.db.models.deletion.CASCADE,
583 related_name="orders",
584 to="django_napse_core.connection",
585 ),
586 ),
587 ],
588 ),
589 migrations.CreateModel(
590 name="NapseSpace",
591 fields=[
592 (
593 "id",
594 models.BigAutoField(
595 auto_created=True,
596 primary_key=True,
597 serialize=False,
598 verbose_name="ID",
599 ),
600 ),
601 ("name", models.CharField(max_length=200)),
602 (
603 "uuid",
604 models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
605 ),
606 ("description", models.TextField()),
607 ("created_at", models.DateTimeField(auto_now_add=True)),
608 (
609 "exchange_account",
610 models.ForeignKey(
611 on_delete=django.db.models.deletion.CASCADE,
612 related_name="spaces",
613 to="django_napse_core.exchangeaccount",
614 ),
615 ),
616 ],
617 options={
618 "unique_together": {("name", "exchange_account")},
619 },
620 ),
621 migrations.AddField(
622 model_name="modification",
623 name="order",
624 field=models.ForeignKey(
625 on_delete=django.db.models.deletion.CASCADE,
626 related_name="modifications",
627 to="django_napse_core.order",
628 ),
629 ),
630 migrations.CreateModel(
631 name="Link",
632 fields=[
633 (
634 "id",
635 models.BigAutoField(
636 auto_created=True,
637 primary_key=True,
638 serialize=False,
639 verbose_name="ID",
640 ),
641 ),
642 ("importance", models.FloatField()),
643 (
644 "bot",
645 models.OneToOneField(
646 on_delete=django.db.models.deletion.CASCADE,
647 related_name="link",
648 to="django_napse_core.bot",
649 ),
650 ),
651 (
652 "cluster",
653 models.ForeignKey(
654 on_delete=django.db.models.deletion.CASCADE,
655 related_name="links",
656 to="django_napse_core.cluster",
657 ),
658 ),
659 ],
660 ),
661 migrations.CreateModel(
662 name="Fleet",
663 fields=[
664 (
665 "id",
666 models.BigAutoField(
667 auto_created=True,
668 primary_key=True,
669 serialize=False,
670 verbose_name="ID",
671 ),
672 ),
673 (
674 "uuid",
675 models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
676 ),
677 ("name", models.CharField(default="Fleet", max_length=100)),
678 ("running", models.BooleanField(default=False)),
679 ("setup_finished", models.BooleanField(default=False)),
680 ("created_at", models.DateTimeField(auto_now_add=True)),
681 (
682 "exchange_account",
683 models.ForeignKey(
684 on_delete=django.db.models.deletion.CASCADE,
685 to="django_napse_core.exchangeaccount",
686 ),
687 ),
688 ],
689 ),
690 migrations.CreateModel(
691 name="Debit",
692 fields=[
693 (
694 "id",
695 models.BigAutoField(
696 auto_created=True,
697 primary_key=True,
698 serialize=False,
699 verbose_name="ID",
700 ),
701 ),
702 ("amount", models.FloatField()),
703 ("ticker", models.CharField(max_length=10)),
704 ("created_at", models.DateTimeField(auto_now_add=True)),
705 (
706 "wallet",
707 models.ForeignKey(
708 on_delete=django.db.models.deletion.CASCADE,
709 related_name="debits",
710 to="django_napse_core.wallet",
711 ),
712 ),
713 ],
714 ),
715 migrations.CreateModel(
716 name="Credit",
717 fields=[
718 (
719 "id",
720 models.BigAutoField(
721 auto_created=True,
722 primary_key=True,
723 serialize=False,
724 verbose_name="ID",
725 ),
726 ),
727 ("amount", models.FloatField()),
728 ("ticker", models.CharField(max_length=10)),
729 ("created_at", models.DateTimeField(auto_now_add=True)),
730 (
731 "wallet",
732 models.ForeignKey(
733 on_delete=django.db.models.deletion.CASCADE,
734 related_name="credits",
735 to="django_napse_core.wallet",
736 ),
737 ),
738 ],
739 ),
740 migrations.AddField(
741 model_name="controller",
742 name="exchange_account",
743 field=models.ForeignKey(
744 on_delete=django.db.models.deletion.CASCADE,
745 related_name="controller",
746 to="django_napse_core.exchangeaccount",
747 ),
748 ),
749 migrations.AddField(
750 model_name="connection",
751 name="owner",
752 field=models.ForeignKey(
753 on_delete=django.db.models.deletion.CASCADE,
754 related_name="connections",
755 to="django_napse_core.wallet",
756 ),
757 ),
758 migrations.AddField(
759 model_name="cluster",
760 name="fleet",
761 field=models.ForeignKey(
762 on_delete=django.db.models.deletion.CASCADE,
763 related_name="clusters",
764 to="django_napse_core.fleet",
765 ),
766 ),
767 migrations.AddField(
768 model_name="cluster",
769 name="template_bot",
770 field=models.OneToOneField(
771 on_delete=django.db.models.deletion.CASCADE,
772 related_name="cluster",
773 to="django_napse_core.bot",
774 ),
775 ),
776 migrations.AddField(
777 model_name="botconfig",
778 name="space",
779 field=models.ForeignKey(
780 on_delete=django.db.models.deletion.CASCADE,
781 related_name="bot_configs",
782 to="django_napse_core.napsespace",
783 ),
784 ),
785 migrations.AddField(
786 model_name="bot",
787 name="strategy",
788 field=models.OneToOneField(
789 on_delete=django.db.models.deletion.CASCADE,
790 related_name="bot",
791 to="django_napse_core.strategy",
792 ),
793 ),
794 migrations.CreateModel(
795 name="SpaceWallet",
796 fields=[
797 (
798 "wallet_ptr",
799 models.OneToOneField(
800 auto_created=True,
801 on_delete=django.db.models.deletion.CASCADE,
802 parent_link=True,
803 primary_key=True,
804 serialize=False,
805 to="django_napse_core.wallet",
806 ),
807 ),
808 (
809 "owner",
810 models.OneToOneField(
811 on_delete=django.db.models.deletion.CASCADE,
812 related_name="wallet",
813 to="django_napse_core.napsespace",
814 ),
815 ),
816 ],
817 bases=("django_napse_core.wallet",),
818 ),
819 migrations.CreateModel(
820 name="SpaceSimulationWallet",
821 fields=[
822 (
823 "wallet_ptr",
824 models.OneToOneField(
825 auto_created=True,
826 on_delete=django.db.models.deletion.CASCADE,
827 parent_link=True,
828 primary_key=True,
829 serialize=False,
830 to="django_napse_core.wallet",
831 ),
832 ),
833 (
834 "owner",
835 models.OneToOneField(
836 on_delete=django.db.models.deletion.CASCADE,
837 related_name="simulation_wallet",
838 to="django_napse_core.napsespace",
839 ),
840 ),
841 ],
842 bases=("django_napse_core.wallet",),
843 ),
844 migrations.CreateModel(
845 name="SinglePairArchitecture",
846 fields=[
847 (
848 "architecture_ptr",
849 models.OneToOneField(
850 auto_created=True,
851 on_delete=django.db.models.deletion.CASCADE,
852 parent_link=True,
853 primary_key=True,
854 serialize=False,
855 to="django_napse_core.architecture",
856 ),
857 ),
858 (
859 "variable_last_candle_date",
860 models.DateTimeField(
861 default=datetime.datetime(
862 1970,
863 1,
864 1,
865 0,
866 0,
867 tzinfo=datetime.timezone.utc,
868 ),
869 ),
870 ),
871 (
872 "controller",
873 models.ForeignKey(
874 on_delete=django.db.models.deletion.CASCADE,
875 related_name="single_pair_architectures",
876 to="django_napse_core.controller",
877 ),
878 ),
879 ],
880 bases=("django_napse_core.architecture",),
881 ),
882 migrations.CreateModel(
883 name="OrderWallet",
884 fields=[
885 (
886 "wallet_ptr",
887 models.OneToOneField(
888 auto_created=True,
889 on_delete=django.db.models.deletion.CASCADE,
890 parent_link=True,
891 primary_key=True,
892 serialize=False,
893 to="django_napse_core.wallet",
894 ),
895 ),
896 (
897 "owner",
898 models.OneToOneField(
899 on_delete=django.db.models.deletion.CASCADE,
900 related_name="wallet",
901 to="django_napse_core.order",
902 ),
903 ),
904 ],
905 bases=("django_napse_core.wallet",),
906 ),
907 migrations.CreateModel(
908 name="Currency",
909 fields=[
910 (
911 "id",
912 models.BigAutoField(
913 auto_created=True,
914 primary_key=True,
915 serialize=False,
916 verbose_name="ID",
917 ),
918 ),
919 ("mbp", models.FloatField()),
920 ("ticker", models.CharField(max_length=10)),
921 ("amount", models.FloatField(default=0)),
922 (
923 "wallet",
924 models.ForeignKey(
925 on_delete=django.db.models.deletion.CASCADE,
926 related_name="currencies",
927 to="django_napse_core.wallet",
928 ),
929 ),
930 ],
931 options={
932 "unique_together": {("wallet", "ticker")},
933 },
934 ),
935 migrations.AlterUniqueTogether(
936 name="controller",
937 unique_together={("pair", "interval", "exchange_account")},
938 ),
939 migrations.CreateModel(
940 name="ConnectionWallet",
941 fields=[
942 (
943 "wallet_ptr",
944 models.OneToOneField(
945 auto_created=True,
946 on_delete=django.db.models.deletion.CASCADE,
947 parent_link=True,
948 primary_key=True,
949 serialize=False,
950 to="django_napse_core.wallet",
951 ),
952 ),
953 (
954 "owner",
955 models.OneToOneField(
956 on_delete=django.db.models.deletion.CASCADE,
957 related_name="wallet",
958 to="django_napse_core.connection",
959 ),
960 ),
961 ],
962 bases=("django_napse_core.wallet",),
963 ),
964 migrations.CreateModel(
965 name="ConnectionSpecificArgs",
966 fields=[
967 (
968 "id",
969 models.BigAutoField(
970 auto_created=True,
971 primary_key=True,
972 serialize=False,
973 verbose_name="ID",
974 ),
975 ),
976 ("key", models.CharField(max_length=100)),
977 ("value", models.CharField(default="None", max_length=100)),
978 ("target_type", models.CharField(default="None", max_length=100)),
979 (
980 "connection",
981 models.ForeignKey(
982 on_delete=django.db.models.deletion.CASCADE,
983 related_name="specific_args",
984 to="django_napse_core.connection",
985 ),
986 ),
987 ],
988 options={
989 "unique_together": {("connection", "key")},
990 },
991 ),
992 migrations.CreateModel(
993 name="ConnectionModification",
994 fields=[
995 (
996 "modification_ptr",
997 models.OneToOneField(
998 auto_created=True,
999 on_delete=django.db.models.deletion.CASCADE,
1000 parent_link=True,
1001 primary_key=True,
1002 serialize=False,
1003 to="django_napse_core.modification",
1004 ),
1005 ),
1006 (
1007 "connection_specific_arg",
1008 models.ForeignKey(
1009 on_delete=django.db.models.deletion.CASCADE,
1010 related_name="modifications",
1011 to="django_napse_core.connectionspecificargs",
1012 ),
1013 ),
1014 ],
1015 bases=("django_napse_core.modification",),
1016 ),
1017 migrations.AlterUniqueTogether(
1018 name="connection",
1019 unique_together={("owner", "bot")},
1020 ),
1021 migrations.CreateModel(
1022 name="BinanceAccount",
1023 fields=[
1024 (
1025 "exchangeaccount_ptr",
1026 models.OneToOneField(
1027 auto_created=True,
1028 on_delete=django.db.models.deletion.CASCADE,
1029 parent_link=True,
1030 primary_key=True,
1031 serialize=False,
1032 to="django_napse_core.exchangeaccount",
1033 ),
1034 ),
1035 ("public_key", models.CharField(max_length=200)),
1036 ("private_key", models.CharField(max_length=200)),
1037 ],
1038 options={
1039 "unique_together": {("public_key", "private_key")},
1040 },
1041 bases=("django_napse_core.exchangeaccount",),
1042 ),
1043 ]