소스 검색

:recycle: removing user_media from profile generation and seed

tags/0.0.1
J 4 년 전
부모
커밋
be0879e8f7
3개의 변경된 파일1개의 추가작업 그리고 6개의 파일을 삭제
  1. 0
    1
      backend/db/data-generator/classes.js
  2. 1
    4
      backend/db/data-generator/index.js
  3. 0
    1
      backend/db/migrations/20210527173933_create_profiles_table.js

+ 0
- 1
backend/db/data-generator/classes.js 파일 보기

@@ -11,7 +11,6 @@ class Profile {
11 11
     constructor(id, override) {
12 12
         this.user_id = override?.user_id ? override.user_id : id
13 13
         this.profile_id = override?.profile_id ? override.profile_id + id : id
14
-        this.user_media = ''
15 14
     }
16 15
 }
17 16
 class Response {

+ 1
- 4
backend/db/data-generator/index.js 파일 보기

@@ -82,9 +82,7 @@ const generateProfiles = jobPosterIds => {
82 82
         starting: config.batchSize * batchCount,
83 83
         profile_id: extraProfileCount,
84 84
     })
85
-    profiles.forEach(profile => {
86
-        profile.user_media = random.media()
87
-    })
85
+
88 86
     // Generate extra job posting profiles
89 87
     // attributed to random user.is_poster === true
90 88
     // TODO: Clean this up. Hard to read...
@@ -102,7 +100,6 @@ const generateProfiles = jobPosterIds => {
102 100
             extras = [...extras, ...generatedExtraProfiles]
103 101
         }
104 102
         extras.forEach(profile => {
105
-            profile.user_media = random.media()
106 103
             profiles.push(profile)
107 104
             extraProfileCount++
108 105
         })

+ 0
- 1
backend/db/migrations/20210527173933_create_profiles_table.js 파일 보기

@@ -2,7 +2,6 @@ exports.up = function (knex) {
2 2
     return knex.schema.createTable('profiles', function (table) {
3 3
         table.increments('profile_id').primary()
4 4
         table.integer('user_id').notNullable()
5
-        table.string('user_media')
6 5
     })
7 6
 }
8 7
 

Loading…
취소
저장