this is really all that's needed
This commit is contained in:
parent
399510c599
commit
7c32600694
21
schema.surql
21
schema.surql
@ -1,21 +1,2 @@
|
|||||||
DELETE website;
|
DEFINE TABLE website SCHEMALESS;
|
||||||
DELETE links_to;
|
|
||||||
DELETE url_index;
|
|
||||||
|
|
||||||
DEFINE TABLE website SCHEMAFULL;
|
|
||||||
DEFINE FIELD url ON TABLE website TYPE string;
|
|
||||||
DEFINE FIELD crawled ON TABLE website TYPE bool DEFAULT false;
|
|
||||||
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);
|
|
||||||
DEFINE FIELD accessed_at ON TABLE website VALUE time::now();
|
DEFINE FIELD accessed_at ON TABLE website VALUE time::now();
|
||||||
DEFINE INDEX url_index ON TABLE website COLUMNS url UNIQUE;
|
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
DEFINE TABLE links_to SCHEMAFULL TYPE RELATION FROM website TO website;
|
|
||||||
DEFINE FIELD discovered_at ON TABLE links_to TYPE datetime DEFAULT time::now();
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user