Skip to content

Commit

Permalink
sync takahe db schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Her Email authored and alphatownsman committed Dec 8, 2023
1 parent 4aa121e commit 767c0d7
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/publish-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
- name: Overwrite version in code
env:
REF_NAME: ${{ github.ref_name }}
run: echo '__version__ = "'$REF_NAME'"' > boofilsic/__init__.py
run: |
echo '__version__ = "'$REF_NAME'"' > boofilsic/__init__.py
echo '__neodb_version__ = "'$REF_NAME'"' >> neodb-takahe/takahe/__init__.py
- name: Send Discord notification
uses: appleboy/discord-action@master
Expand Down
90 changes: 90 additions & 0 deletions takahe/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,4 +723,94 @@ class Migration(migrations.Migration):
"db_table": "activities_fanout",
},
),
migrations.CreateModel(
name="TimelineEvent",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"type",
models.CharField(
choices=[
("post", "Post"),
("boost", "Boost"),
("mentioned", "Mentioned"),
("liked", "Liked"),
("followed", "Followed"),
("follow_requested", "Follow Requested"),
("boosted", "Boosted"),
("announcement", "Announcement"),
("identity_created", "Identity Created"),
],
max_length=100,
),
),
("published", models.DateTimeField(default=django.utils.timezone.now)),
("seen", models.BooleanField(default=False)),
("dismissed", models.BooleanField(default=False)),
("created", models.DateTimeField(auto_now_add=True)),
(
"identity",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="timeline_events",
to="takahe.identity",
),
),
(
"subject_identity",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="timeline_events_about_us",
to="takahe.identity",
),
),
(
"subject_post",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="timeline_events",
to="takahe.post",
),
),
(
"subject_post_interaction",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="timeline_events",
to="takahe.postinteraction",
),
),
],
options={
"db_table": "activities_timelineevent",
"indexes": [
models.Index(
fields=["identity", "type", "subject_post", "subject_identity"],
name="activities__identit_0b93c3_idx",
),
models.Index(
fields=["identity", "type", "subject_identity"],
name="activities__identit_cc2290_idx",
),
models.Index(
fields=["identity", "created"],
name="activities__identit_872fbb_idx",
),
],
},
),
]

0 comments on commit 767c0d7

Please sign in to comment.