summaryrefslogtreecommitdiff
path: root/app/trading/migrations
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2021-07-14 09:31:15 -0400
committerluxagraf <sng@luxagraf.net>2021-07-14 09:31:15 -0400
commit39086b58106ff6181d029e0ef845593605821873 (patch)
treeb6652d1b74c1187eafbd0fbd74a3f00f4f1c9c58 /app/trading/migrations
parentc2c0421207694aa5eb148f05a57440716ae2dc8d (diff)
trading: added trading to toolset
Diffstat (limited to 'app/trading/migrations')
-rw-r--r--app/trading/migrations/0001_initial.py65
-rw-r--r--app/trading/migrations/0002_remove_luxtrademodel_percent_portfolio.py17
-rw-r--r--app/trading/migrations/0003_luxtrademodel_status.py18
-rw-r--r--app/trading/migrations/0004_rename_luxtrademodel_luxtrade.py17
-rw-r--r--app/trading/migrations/0005_auto_20210714_0747.py28
-rw-r--r--app/trading/migrations/0006_luxtrade_close_price.py18
-rw-r--r--app/trading/migrations/0007_alter_luxtrade_status.py18
-rw-r--r--app/trading/migrations/__init__.py0
8 files changed, 181 insertions, 0 deletions
diff --git a/app/trading/migrations/0001_initial.py b/app/trading/migrations/0001_initial.py
new file mode 100644
index 0000000..54f8032
--- /dev/null
+++ b/app/trading/migrations/0001_initial.py
@@ -0,0 +1,65 @@
+# Generated by Django 3.2.4 on 2021-07-13 14:27
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='LuxTradeModel',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('symbol', models.CharField(max_length=256)),
+ ('date', models.DateTimeField(auto_now_add=True)),
+ ('entry_price', models.FloatField()),
+ ('stop_price', models.FloatField()),
+ ('target_price', models.FloatField()),
+ ('shares', models.FloatField()),
+ ('percent_portfolio', models.FloatField()),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Ticker',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('symbol', models.CharField(max_length=9)),
+ ('name', models.CharField(blank=True, max_length=243, null=True)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='TradeJrnl',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('date', models.DateTimeField(auto_now_add=True)),
+ ('body_markdown', models.TextField(blank=True)),
+ ('body_html', models.TextField(blank=True, null=True)),
+ ],
+ ),
+ migrations.CreateModel(
+ name='OptionsTrade',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('date', models.DateTimeField()),
+ ('transaction_code', models.CharField(choices=[('Trade', 'Trade')], max_length=25)),
+ ('transaction_subcode', models.CharField(choices=[('Buy to Open', 'Buy to Open'), ('Sell to Open', 'Sell to Open'), ('Sell to Close', 'Sell to Close')], max_length=25)),
+ ('buy_sell', models.CharField(choices=[('Buy', 'Buy'), ('Sell', 'Sell')], max_length=4)),
+ ('open_close', models.CharField(choices=[('Open', 'Open'), ('Close', 'Close')], max_length=5)),
+ ('quantity', models.FloatField()),
+ ('expiration_date', models.DateTimeField()),
+ ('strike', models.FloatField()),
+ ('call_put', models.CharField(choices=[('C', 'Call'), ('P', 'Put')], max_length=4)),
+ ('price', models.FloatField()),
+ ('fees', models.FloatField()),
+ ('amount', models.FloatField()),
+ ('description', models.TextField(blank=True)),
+ ('symbol', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='trading.ticker')),
+ ],
+ ),
+ ]
diff --git a/app/trading/migrations/0002_remove_luxtrademodel_percent_portfolio.py b/app/trading/migrations/0002_remove_luxtrademodel_percent_portfolio.py
new file mode 100644
index 0000000..b0dc82a
--- /dev/null
+++ b/app/trading/migrations/0002_remove_luxtrademodel_percent_portfolio.py
@@ -0,0 +1,17 @@
+# Generated by Django 3.2.4 on 2021-07-13 18:41
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='luxtrademodel',
+ name='percent_portfolio',
+ ),
+ ]
diff --git a/app/trading/migrations/0003_luxtrademodel_status.py b/app/trading/migrations/0003_luxtrademodel_status.py
new file mode 100644
index 0000000..bd1b417
--- /dev/null
+++ b/app/trading/migrations/0003_luxtrademodel_status.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.4 on 2021-07-13 19:20
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0002_remove_luxtrademodel_percent_portfolio'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luxtrademodel',
+ name='status',
+ field=models.IntegerField(choices=[(0, 'Open'), (1, 'Closed')], default=0),
+ ),
+ ]
diff --git a/app/trading/migrations/0004_rename_luxtrademodel_luxtrade.py b/app/trading/migrations/0004_rename_luxtrademodel_luxtrade.py
new file mode 100644
index 0000000..bcb59d3
--- /dev/null
+++ b/app/trading/migrations/0004_rename_luxtrademodel_luxtrade.py
@@ -0,0 +1,17 @@
+# Generated by Django 3.2.4 on 2021-07-14 07:18
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0003_luxtrademodel_status'),
+ ]
+
+ operations = [
+ migrations.RenameModel(
+ old_name='LuxTradeModel',
+ new_name='LuxTrade',
+ ),
+ ]
diff --git a/app/trading/migrations/0005_auto_20210714_0747.py b/app/trading/migrations/0005_auto_20210714_0747.py
new file mode 100644
index 0000000..bd54f71
--- /dev/null
+++ b/app/trading/migrations/0005_auto_20210714_0747.py
@@ -0,0 +1,28 @@
+# Generated by Django 3.2.4 on 2021-07-14 07:47
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0004_rename_luxtrademodel_luxtrade'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luxtrade',
+ name='close_date',
+ field=models.DateTimeField(blank=True, null=True),
+ ),
+ migrations.AddField(
+ model_name='luxtrade',
+ name='open_date',
+ field=models.DateTimeField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name='luxtrade',
+ name='status',
+ field=models.IntegerField(choices=[(0, 'Open'), (1, 'Closed'), (2, 'Watching')], default=0),
+ ),
+ ]
diff --git a/app/trading/migrations/0006_luxtrade_close_price.py b/app/trading/migrations/0006_luxtrade_close_price.py
new file mode 100644
index 0000000..42f254d
--- /dev/null
+++ b/app/trading/migrations/0006_luxtrade_close_price.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.4 on 2021-07-14 08:22
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0005_auto_20210714_0747'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luxtrade',
+ name='close_price',
+ field=models.FloatField(blank=True, null=True),
+ ),
+ ]
diff --git a/app/trading/migrations/0007_alter_luxtrade_status.py b/app/trading/migrations/0007_alter_luxtrade_status.py
new file mode 100644
index 0000000..0566b17
--- /dev/null
+++ b/app/trading/migrations/0007_alter_luxtrade_status.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.4 on 2021-07-14 09:25
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('trading', '0006_luxtrade_close_price'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='luxtrade',
+ name='status',
+ field=models.IntegerField(choices=[(0, 'Open'), (1, 'Closed'), (2, 'Watching')], default=2),
+ ),
+ ]
diff --git a/app/trading/migrations/__init__.py b/app/trading/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/trading/migrations/__init__.py