Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
{
"version": "6",
"dialect": "sqlite",
"id": "1e0252aa-1354-4133-a0de-6e8f2928afae",
"prevId": "606e2e14-6684-430a-bdeb-ef753e664f47",
"tables": {
"album_photos": {
"name": "album_photos",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"album_id": {
"name": "album_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"photo_id": {
"name": "photo_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"position": {
"name": "position",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1000000
},
"added_at": {
"name": "added_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
}
},
"indexes": {
"album_photos_album_photo_unique": {
"name": "album_photos_album_photo_unique",
"columns": ["album_id", "photo_id"],
"isUnique": true
}
},
"foreignKeys": {
"album_photos_album_id_albums_id_fk": {
"name": "album_photos_album_id_albums_id_fk",
"tableFrom": "album_photos",
"tableTo": "albums",
"columnsFrom": ["album_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"album_photos_photo_id_photos_id_fk": {
"name": "album_photos_photo_id_photos_id_fk",
"tableFrom": "album_photos",
"tableTo": "photos",
"columnsFrom": ["photo_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"albums": {
"name": "albums",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"cover_photo_id": {
"name": "cover_photo_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_hidden": {
"name": "is_hidden",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"password_hash": {
"name": "password_hash",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"position": {
"name": "position",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
}
},
"indexes": {},
"foreignKeys": {
"albums_cover_photo_id_photos_id_fk": {
"name": "albums_cover_photo_id_photos_id_fk",
"tableFrom": "albums",
"tableTo": "photos",
"columnsFrom": ["cover_photo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"photo_access_keys": {
"name": "photo_access_keys",
"columns": {
"access_key": {
"name": "access_key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"photo_id": {
"name": "photo_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"idx_photo_access_keys_photo_id": {
"name": "idx_photo_access_keys_photo_id",
"columns": ["photo_id"],
"isUnique": false
}
},
"foreignKeys": {
"photo_access_keys_photo_id_photos_id_fk": {
"name": "photo_access_keys_photo_id_photos_id_fk",
"tableFrom": "photo_access_keys",
"tableTo": "photos",
"columnsFrom": ["photo_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"photo_access_keys_access_key_photo_id_pk": {
"columns": ["access_key", "photo_id"],
"name": "photo_access_keys_access_key_photo_id_pk"
}
},
"uniqueConstraints": {},
"checkConstraints": {}
},
"photo_reactions": {
"name": "photo_reactions",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"photo_id": {
"name": "photo_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"reaction_type": {
"name": "reaction_type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"fingerprint": {
"name": "fingerprint",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"ip_address": {
"name": "ip_address",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"user_agent": {
"name": "user_agent",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
}
},
"indexes": {},
"foreignKeys": {
"photo_reactions_photo_id_photos_id_fk": {
"name": "photo_reactions_photo_id_photos_id_fk",
"tableFrom": "photo_reactions",
"tableTo": "photos",
"columnsFrom": ["photo_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"photos": {
"name": "photos",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"width": {
"name": "width",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"height": {
"name": "height",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"aspect_ratio": {
"name": "aspect_ratio",
"type": "real",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"date_taken": {
"name": "date_taken",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"storage_key": {
"name": "storage_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnail_key": {
"name": "thumbnail_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"file_size": {
"name": "file_size",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"last_modified": {
"name": "last_modified",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"original_url": {
"name": "original_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnail_url": {
"name": "thumbnail_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnail_hash": {
"name": "thumbnail_hash",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"tags": {
"name": "tags",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"exif": {
"name": "exif",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"latitude": {
"name": "latitude",
"type": "real",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"longitude": {
"name": "longitude",
"type": "real",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"country": {
"name": "country",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"city": {
"name": "city",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"location_name": {
"name": "location_name",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_live_photo": {
"name": "is_live_photo",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"live_photo_video_url": {
"name": "live_photo_video_url",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"live_photo_video_key": {
"name": "live_photo_video_key",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"photos_id_unique": {
"name": "photos_id_unique",
"columns": ["id"],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"pipeline_queue": {
"name": "pipeline_queue",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"payload": {
"name": "payload",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'{\"type\":\"photo\",\"storageKey\":\"\"}'"
},
"priority": {
"name": "priority",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"available_at": {
"name": "available_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "0"
},
"attempts": {
"name": "attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"max_attempts": {
"name": "max_attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 3
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'pending'"
},
"status_stage": {
"name": "status_stage",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"error_message": {
"name": "error_message",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"warning_code": {
"name": "warning_code",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
},
"completed_at": {
"name": "completed_at",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"idx_pipeline_queue_pending": {
"name": "idx_pipeline_queue_pending",
"columns": ["\"priority\" DESC", "created_at", "id"],
"isUnique": false,
"where": "\"pipeline_queue\".\"status\" = 'pending'"
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"settings": {
"name": "settings",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"namespace": {
"name": "namespace",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'common'"
},
"key": {
"name": "key",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"default_value": {
"name": "default_value",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_public": {
"name": "is_public",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"is_readonly": {
"name": "is_readonly",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"is_secret": {
"name": "is_secret",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"enum": {
"name": "enum",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
},
"updated_by": {
"name": "updated_by",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"idx_namespace_key": {
"name": "idx_namespace_key",
"columns": ["namespace", "key"],
"isUnique": true
}
},
"foreignKeys": {
"settings_updated_by_users_id_fk": {
"name": "settings_updated_by_users_id_fk",
"tableFrom": "settings",
"tableTo": "users",
"columnsFrom": ["updated_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"settings_storage_providers": {
"name": "settings_storage_providers",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"provider": {
"name": "provider",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"config": {
"name": "config",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
},
"updated_at": {
"name": "updated_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(unixepoch())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"users": {
"name": "users",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"password": {
"name": "password",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"avatar": {
"name": "avatar",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"is_admin": {
"name": "is_admin",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
}
},
"indexes": {
"users_name_unique": {
"name": "users_name_unique",
"columns": ["name"],
"isUnique": true
},
"users_email_unique": {
"name": "users_email_unique",
"columns": ["email"],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {
"idx_pipeline_queue_pending": {
"columns": {
"\"priority\" DESC": {
"isExpression": true
}
}
}
}
}
}