Skip to content

Commit

Permalink
feat: add index for topped at
Browse files Browse the repository at this point in the history
  • Loading branch information
hyukychang committed Nov 14, 2024
1 parent e10acb2 commit 679b417
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions apps/core/migrations/0059_alter_article_topped_at.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.11 on 2024-11-14 13:20

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("core", "0058_article_latest_portal_view_count_alter_article_url_and_more"),
]

operations = [
migrations.AlterField(
model_name="article",
name="topped_at",
field=models.DateTimeField(
blank=True,
db_index=True,
default=None,
null=True,
verbose_name="인기글 달성 시각",
),
),
]
1 change: 1 addition & 0 deletions apps/core/models/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class Article(MetaDataModel):
blank=True,
null=True,
default=None,
db_index=True,
)

class Meta(MetaDataModel.Meta):
Expand Down
4 changes: 4 additions & 0 deletions ara/settings/dev/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import socket
from datetime import datetime, timezone

import pymysql

from ara.settings import INSTALLED_APPS, LOGGING, MIDDLEWARE

from ..djangorestframework import REST_FRAMEWORK

pymysql.install_as_MySQLdb()

DEBUG = True

ALLOWED_HOSTS = ["*"]
Expand Down

0 comments on commit 679b417

Please sign in to comment.