소스 검색

Migration PGSQL

omassot 7 년 전
부모
커밋
0fa60497d3
5개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 3
      backlog/settings.py
  2. BIN
      db.sqlite3
  3. 0 0
      dump.json
  4. 1 1
      main/models.py
  5. 3 2
      requirements.txt

+ 6 - 3
backlog/settings.py

@@ -76,9 +76,12 @@ WSGI_APPLICATION = 'backlog.wsgi.application'
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.sqlite3',
-#         'NAME': r'\\p-app-4\E\Backlog\backlog_db.sqlite3',
-        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
+        'ENGINE': 'django.db.backends.postgresql',
+        'NAME': 'backlog',                      
+        'USER': 'backlog',
+        'PASSWORD': 'backlog',
+        'HOST': 'localhost',
+        'PORT': '5432',
     }
 }
 

BIN
db.sqlite3


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dump.json


+ 1 - 1
main/models.py

@@ -114,7 +114,7 @@ class Sprint(BaseModel):
                                 FROM main_story_sprints 
                                 GROUP BY story_id) as last_sprints 
                     ON main_story.id = last_sprints.story_id
-                WHERE last_sprints.sprint_id = {} AND closed = 1;
+                WHERE last_sprints.sprint_id = {} AND closed = True;
             """.format(self.id)
         with connection.cursor() as cursor:
             cursor.execute(sql)

+ 3 - 2
requirements.txt

@@ -1,3 +1,4 @@
-Django
-martor
+psycopg2
+Django
+martor
 path.py>=11.1.0

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.