feat: implement database schema (#13) #41

Closed
makiolaj wants to merge 0 commits from feature/issue-13-database-schema into develop
Owner

Overview

Creates the initial database schema migration for the Pantry MVP.

Changes

  • All core tables: inventory_items, products, tags, item_tags, units, user_profiles
  • ENUM types: tag_category, unit_type
  • Performance indexes on key columns
  • Helper functions: update_updated_at(), convert_unit(), search_products()
  • Automatic timestamp triggers
  • Full-text search support
  • Comprehensive documentation comments

Migration Details

  • File: supabase/migrations/001_initial_schema.sql
  • Tables: 6 core tables
  • Functions: 3 utility functions
  • Triggers: 2 auto-update triggers
  • Indexes: 11 performance indexes

Testing

Migration syntax validated against PostgreSQL 15+ spec.

Next Steps

  • Issue #14: RLS policies
  • Issue #16: Seed default units
  • Issue #17: Seed default tags

Closes #13

## Overview Creates the initial database schema migration for the Pantry MVP. ## Changes - ✅ All core tables: inventory_items, products, tags, item_tags, units, user_profiles - ✅ ENUM types: tag_category, unit_type - ✅ Performance indexes on key columns - ✅ Helper functions: update_updated_at(), convert_unit(), search_products() - ✅ Automatic timestamp triggers - ✅ Full-text search support - ✅ Comprehensive documentation comments ## Migration Details - **File**: `supabase/migrations/001_initial_schema.sql` - **Tables**: 6 core tables - **Functions**: 3 utility functions - **Triggers**: 2 auto-update triggers - **Indexes**: 11 performance indexes ## Testing Migration syntax validated against PostgreSQL 15+ spec. ## Next Steps - Issue #14: RLS policies - Issue #16: Seed default units - Issue #17: Seed default tags Closes #13
makiolaj added 1 commit 2026-02-09 02:34:40 +00:00
feat: add initial database schema migration (#13)
Some checks failed
Deploy to Coolify / Deploy to Production (pull_request) Has been cancelled
Deploy to Coolify / Code Quality (pull_request) Has been cancelled
Deploy to Coolify / Run Tests (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Development (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Test (pull_request) Has been cancelled
Pull Request Checks / Validate PR (pull_request) Has been cancelled
441266683c
- Create all core tables: inventory_items, products, tags, item_tags, units, user_profiles
- Add ENUM types: tag_category, unit_type
- Implement indexes for performance optimization
- Add helper functions: update_updated_at(), convert_unit(), search_products()
- Add triggers for automatic timestamp updates
- Full-text search support for products
- Comprehensive table comments for documentation

Closes #13
makiolaj closed this pull request 2026-02-09 12:36:22 +00:00
Some checks failed
Deploy to Coolify / Deploy to Production (pull_request) Has been cancelled
Deploy to Coolify / Code Quality (pull_request) Has been cancelled
Deploy to Coolify / Run Tests (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Development (pull_request) Has been cancelled
Deploy to Coolify / Deploy to Test (pull_request) Has been cancelled
Pull Request Checks / Validate PR (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.