Public
Like
HTOC
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
This directory contains the database schema and query functions for the House Hunter application.
migrations.ts- Contains the database schema definitions and initial data seedingqueries.ts- Contains functions for querying the database
The main table is properties_v1 which stores all property listings with the following fields:
id- Unique identifiertitle- Property titledescription- Detailed descriptionprice- Price in USDbedrooms- Number of bedroomsbathrooms- Number of bathroomssqft- Square footageaddress- Street addresscity- Citystate- Statezip- ZIP codelat- Latitude (for map display)lng- Longitude (for map display)image_url- URL to the property imagecreated_at- Creation timestampupdated_at- Last update timestamp
The database is automatically initialized when the application starts. The runMigrations function creates the necessary tables and seeds initial data if needed.