2024-08-26 06:57:36 +00:00
|
|
|
DELETE website;
|
|
|
|
DELETE links_to;
|
|
|
|
DELETE url_index;
|
|
|
|
|
2024-08-23 11:22:49 +00:00
|
|
|
DEFINE TABLE website SCHEMAFULL;
|
|
|
|
DEFINE FIELD url ON TABLE website TYPE string;
|
2024-10-07 17:14:56 +00:00
|
|
|
DEFINE FIELD crawled ON TABLE website TYPE bool DEFAULT false;
|
2024-08-23 11:22:49 +00:00
|
|
|
DEFINE FIELD domain ON TABLE website VALUE parse::url::domain($this.url) ASSERT !type::is::none($value);
|
|
|
|
DEFINE FIELD path ON TABLE website VALUE parse::url::path($this.url) ASSERT !type::is::none($value);
|
2024-10-07 17:14:56 +00:00
|
|
|
DEFINE FIELD accessed_at ON TABLE website VALUE time::now();
|
2024-08-26 06:57:36 +00:00
|
|
|
DEFINE INDEX url_index ON TABLE website COLUMNS url UNIQUE;
|
2024-08-23 11:22:49 +00:00
|
|
|
|
2024-10-07 17:14:56 +00:00
|
|
|
DEFINE TABLE email SCHEMAFULL;
|
|
|
|
DEFINE FIELD email ON TABLE email TYPE string;
|
|
|
|
|
|
|
|
DEFINE TABLE found_on SCHEMAFULL TYPE RELATION FROM email TO website;
|
|
|
|
DEFINE FIELD discovered_at ON TABLE found_on TYPE datetime DEFAULT time::now();
|
|
|
|
|
2024-08-23 11:22:49 +00:00
|
|
|
DEFINE TABLE links_to SCHEMAFULL TYPE RELATION FROM website TO website;
|
|
|
|
DEFINE FIELD discovered_at ON TABLE links_to TYPE datetime DEFAULT time::now();
|
|
|
|
|