mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 05:05:38 -04:00
Docker self-hosting support: - Dockerfile (multi-stage Alpine build with tini init) - docker-compose.yml with named volume for SQLite persistence - /api/health endpoint for container health checks - Auto-migration on startup via drizzle-orm/libsql/migrator - Graceful shutdown (SIGTERM stops scheduler, closes DB) - Next.js standalone output mode for minimal image size Database driver migration (better-sqlite3 → @libsql/client): - Eliminates native C++ compilation, enabling Alpine Docker images - All DB queries converted from sync to async across services and routes - DATABASE_URL now uses libsql file: prefix format - drizzle.config.ts dialect changed to turso for libsql support - Initial migration files generated in drizzle/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1599 lines
34 KiB
JSON
1599 lines
34 KiB
JSON
{
|
|
"version": "7",
|
|
"dialect": "sqlite",
|
|
"id": "81a1f7d0-3964-479d-8058-eec7c8b94a91",
|
|
"prevIds": [
|
|
"00000000-0000-0000-0000-000000000000"
|
|
],
|
|
"ddl": [
|
|
{
|
|
"name": "account",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "availabilityOffers",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "episodes",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "seasons",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "session",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "titleRecommendations",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "titles",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "user",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "userEpisodeWatches",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "userMovieWatches",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "userRatings",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "userTitleStatus",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"name": "verification",
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "userId",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "accountId",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "providerId",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "accessToken",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "refreshToken",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "accessTokenExpiresAt",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "refreshTokenExpiresAt",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "scope",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "password",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "createdAt",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updatedAt",
|
|
"entityType": "columns",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "titleId",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'US'",
|
|
"generated": null,
|
|
"name": "region",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "providerId",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "providerName",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "logoPath",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "offerType",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "link",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "lastFetchedAt",
|
|
"entityType": "columns",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "seasonId",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "episodeNumber",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "name",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "overview",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "stillPath",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "airDate",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "runtimeMinutes",
|
|
"entityType": "columns",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "titleId",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "seasonNumber",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "name",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "overview",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "posterPath",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "airDate",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "lastFetchedAt",
|
|
"entityType": "columns",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "userId",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "token",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "expiresAt",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "ipAddress",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "userAgent",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "createdAt",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updatedAt",
|
|
"entityType": "columns",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "titleId",
|
|
"entityType": "columns",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "recommendedTitleId",
|
|
"entityType": "columns",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "source",
|
|
"entityType": "columns",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "rank",
|
|
"entityType": "columns",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "lastFetchedAt",
|
|
"entityType": "columns",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "tmdbId",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "type",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "title",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "originalTitle",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "overview",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "releaseDate",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "firstAirDate",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "posterPath",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "backdropPath",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "real",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "popularity",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "real",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "voteAverage",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "voteCount",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "status",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "lastFetchedAt",
|
|
"entityType": "columns",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "name",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "email",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "false",
|
|
"generated": null,
|
|
"name": "emailVerified",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "image",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "createdAt",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updatedAt",
|
|
"entityType": "columns",
|
|
"table": "user"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "userId",
|
|
"entityType": "columns",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "episodeId",
|
|
"entityType": "columns",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "watchedAt",
|
|
"entityType": "columns",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'manual'",
|
|
"generated": null,
|
|
"name": "source",
|
|
"entityType": "columns",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "userId",
|
|
"entityType": "columns",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "titleId",
|
|
"entityType": "columns",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "watchedAt",
|
|
"entityType": "columns",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'manual'",
|
|
"generated": null,
|
|
"name": "source",
|
|
"entityType": "columns",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "userId",
|
|
"entityType": "columns",
|
|
"table": "userRatings"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "titleId",
|
|
"entityType": "columns",
|
|
"table": "userRatings"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "ratingStars",
|
|
"entityType": "columns",
|
|
"table": "userRatings"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "ratedAt",
|
|
"entityType": "columns",
|
|
"table": "userRatings"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "userId",
|
|
"entityType": "columns",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "titleId",
|
|
"entityType": "columns",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "status",
|
|
"entityType": "columns",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "addedAt",
|
|
"entityType": "columns",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updatedAt",
|
|
"entityType": "columns",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "id",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "identifier",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "value",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "expiresAt",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "createdAt",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": null,
|
|
"generated": null,
|
|
"name": "updatedAt",
|
|
"entityType": "columns",
|
|
"table": "verification"
|
|
},
|
|
{
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_account_userId_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "account"
|
|
},
|
|
{
|
|
"columns": [
|
|
"titleId"
|
|
],
|
|
"tableTo": "titles",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_availabilityOffers_titleId_titles_id_fk",
|
|
"entityType": "fks",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"columns": [
|
|
"seasonId"
|
|
],
|
|
"tableTo": "seasons",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_episodes_seasonId_seasons_id_fk",
|
|
"entityType": "fks",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"columns": [
|
|
"titleId"
|
|
],
|
|
"tableTo": "titles",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_seasons_titleId_titles_id_fk",
|
|
"entityType": "fks",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_session_userId_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"columns": [
|
|
"titleId"
|
|
],
|
|
"tableTo": "titles",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_titleRecommendations_titleId_titles_id_fk",
|
|
"entityType": "fks",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"columns": [
|
|
"recommendedTitleId"
|
|
],
|
|
"tableTo": "titles",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_titleRecommendations_recommendedTitleId_titles_id_fk",
|
|
"entityType": "fks",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userEpisodeWatches_userId_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
"episodeId"
|
|
],
|
|
"tableTo": "episodes",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userEpisodeWatches_episodeId_episodes_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userMovieWatches_userId_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
"titleId"
|
|
],
|
|
"tableTo": "titles",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userMovieWatches_titleId_titles_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userRatings_userId_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userRatings"
|
|
},
|
|
{
|
|
"columns": [
|
|
"titleId"
|
|
],
|
|
"tableTo": "titles",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userRatings_titleId_titles_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userRatings"
|
|
},
|
|
{
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userTitleStatus_userId_user_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"columns": [
|
|
"titleId"
|
|
],
|
|
"tableTo": "titles",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"nameExplicit": false,
|
|
"name": "fk_userTitleStatus_titleId_titles_id_fk",
|
|
"entityType": "fks",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "account_pk",
|
|
"table": "account",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "episodes_pk",
|
|
"table": "episodes",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "seasons_pk",
|
|
"table": "seasons",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "session_pk",
|
|
"table": "session",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "titles_pk",
|
|
"table": "titles",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "user_pk",
|
|
"table": "user",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "userEpisodeWatches_pk",
|
|
"table": "userEpisodeWatches",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "userMovieWatches_pk",
|
|
"table": "userMovieWatches",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "verification_pk",
|
|
"table": "verification",
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "titleId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "region",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "providerId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "offerType",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "availabilityOffers_unique",
|
|
"entityType": "indexes",
|
|
"table": "availabilityOffers"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "seasonId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "episodeNumber",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "episodes_seasonId_episodeNumber",
|
|
"entityType": "indexes",
|
|
"table": "episodes"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "titleId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "seasonNumber",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "seasons_titleId_seasonNumber",
|
|
"entityType": "indexes",
|
|
"table": "seasons"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "titleId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "recommendedTitleId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "source",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "titleRecommendations_unique",
|
|
"entityType": "indexes",
|
|
"table": "titleRecommendations"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "tmdbId",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "titles_tmdbId_unique",
|
|
"entityType": "indexes",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "type",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "releaseDate",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "titles_type_releaseDate",
|
|
"entityType": "indexes",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "type",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "firstAirDate",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "titles_type_firstAirDate",
|
|
"entityType": "indexes",
|
|
"table": "titles"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "userId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "watchedAt",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "userEpisodeWatches_userId_watchedAt",
|
|
"entityType": "indexes",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "episodeId",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "userEpisodeWatches_episodeId",
|
|
"entityType": "indexes",
|
|
"table": "userEpisodeWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "userId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "watchedAt",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "userMovieWatches_userId_watchedAt",
|
|
"entityType": "indexes",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "titleId",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "userMovieWatches_titleId",
|
|
"entityType": "indexes",
|
|
"table": "userMovieWatches"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "userId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "titleId",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "userRatings_userId_titleId",
|
|
"entityType": "indexes",
|
|
"table": "userRatings"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "userId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "titleId",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "userTitleStatus_userId_titleId",
|
|
"entityType": "indexes",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"columns": [
|
|
{
|
|
"value": "userId",
|
|
"isExpression": false
|
|
},
|
|
{
|
|
"value": "status",
|
|
"isExpression": false
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"origin": "manual",
|
|
"name": "userTitleStatus_userId_status",
|
|
"entityType": "indexes",
|
|
"table": "userTitleStatus"
|
|
},
|
|
{
|
|
"columns": [
|
|
"token"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "session_token_unique",
|
|
"entityType": "uniques",
|
|
"table": "session"
|
|
},
|
|
{
|
|
"columns": [
|
|
"email"
|
|
],
|
|
"nameExplicit": false,
|
|
"name": "user_email_unique",
|
|
"entityType": "uniques",
|
|
"table": "user"
|
|
}
|
|
],
|
|
"renames": []
|
|
} |