Storing photo counts.
This commit is contained in:
		
							parent
							
								
									ac904c849d
								
							
						
					
					
						commit
						edc724b475
					
				|  | @ -171,6 +171,14 @@ | |||
| 					<div class="duration">{{ formatDuration(release.duration) }}</div> | ||||
| 				</div> | ||||
| 
 | ||||
| 				<div | ||||
| 					v-if="release.photoCount" | ||||
| 					class="row-tidbit" | ||||
| 				> | ||||
| 					<span class="row-label">Photos</span> | ||||
| 					{{ release.photoCount }} | ||||
| 				</div> | ||||
| 
 | ||||
| 				<div | ||||
| 					v-if="release.shootId" | ||||
| 					class="row-tidbit" | ||||
|  |  | |||
|  | @ -553,6 +553,7 @@ const releaseFragment = ` | |||
|     createdAt | ||||
|     shootId | ||||
| 	qualities | ||||
| 	photoCount | ||||
| 	productionDate | ||||
| 	createdBatchId | ||||
| 	productionLocation | ||||
|  |  | |||
|  | @ -0,0 +1,11 @@ | |||
| exports.up = async (knex) => { | ||||
| 	await knex.schema.alterTable('releases', (table) => { | ||||
| 		table.integer('photo_count'); | ||||
| 	}); | ||||
| }; | ||||
| 
 | ||||
| exports.down = async (knex) => { | ||||
| 	await knex.schema.alterTable('releases', (table) => { | ||||
| 		table.dropColumn('photo_count'); | ||||
| 	}); | ||||
| }; | ||||
|  | @ -42,6 +42,7 @@ async function curateReleaseEntry(release, batchId, existingRelease, type = 'sce | |||
| 		slug, | ||||
| 		description: decode(release.description), | ||||
| 		comment: release.comment, | ||||
| 		photo_count: Number(release.photoCount) || null, | ||||
| 		deep: typeof release.deep === 'boolean' ? release.deep : false, | ||||
| 		deep_url: release.deepUrl, | ||||
| 		updated_batch_id: batchId, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue