// Use DBML to define your database structure // Docs: https://dbml.dbdiagram.io/docs Table seeds [note: 'Table contains the URIs which are used for the initial scraping.'] { seed_id integer [primary key] uri text [not null, unique] region_id integer [not null, ref: > regions.region_id] } Table regions { region_id integer [primary key] name varchar(255) [not null] } Table properties { property_id integer [primary key] property_platform_id varchar(255) [unique, not null, note: 'uuid from platform beeing used'] seed_id integer [not null, ref: > seeds.seed_id] check_data json [note: 'for storing data, which is beeing used for consistency checks. E. g. geo_dates or title'] last_found timestamp created_at timestamp } Table occupancies { occupancy_id integer [primary key] property_id integer [unique, ref: > properties.property_id] occupancy json [not null] header text [not null] created_at timestamp [not null] } enum entities { property occupancy } Table exceptions { extraction_id integer [primary key] exception json [not null, note: "exception while scraping (e. g. HTTP error message) and called url."] entity entities [not null, note: "for which entity did the exception occur."] entity_id integer [not null, note: "either a property_id or occupancy_id"] }