Просмотр исходного кода

:recycle: removing user_media from profile generation and seed

tags/0.0.1
J 4 лет назад
Родитель
Сommit
be0879e8f7

+ 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
 

Загрузка…
Отмена
Сохранить