Database

This directory contains the database schema and query functions for the Tweet Metrics Tracker application.

Files

  • migrations.ts - Database schema definitions and initialization
  • queries.ts - Database query functions

Tables

  • twitter_users_v1 - Stores Twitter user information
  • tweets_v1 - Stores tweets
  • metrics_v1 - Stores historical metrics for tweets

Schema Versioning

When modifying the database schema, create new tables with incremented version numbers (e.g., tweets_v2) rather than altering existing tables.