regenerate last migrations with updated drift_dev
This commit is contained in:
1 parent
d9bd5e3ff7
commit
d751e9b9a1
8 files changed
+2676
-245
No files matched your search
@@ -1 +1,892 @@
|
||||
{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"bang","was_declared_in_moor":true,"columns":[{"name":"trigger","getter_name":"trigger","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"group","getter_name":"group","moor_type":"int","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<BangGroup>(BangGroup.values)","dart_type_name":"BangGroup"}},{"name":"website_name","getter_name":"websiteName","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"domain","getter_name":"domain","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"url_template","getter_name":"urlTemplate","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"category","getter_name":"category","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"sub_category","getter_name":"subCategory","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"format","getter_name":"format","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const BangFormatConverter()","dart_type_name":"Set<BangFormat>?"}},{"name":"additional_triggers","getter_name":"additionalTriggers","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const TriggerListConverter()","dart_type_name":"Set<String>?"}},{"name":"searxng_api","getter_name":"searxngApi","moor_type":"bool","nullable":false,"customConstraints":"NOT NULL DEFAULT FALSE","default_dart":"const CustomExpression('FALSE')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":["PRIMARY KEY(\"trigger\", \"group\")"],"explicit_pk":["trigger","group"]}},{"id":1,"references":[0],"type":"table","data":{"name":"bang_triggers","was_declared_in_moor":true,"columns":[{"name":"trigger","getter_name":"trigger","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"group","getter_name":"group","moor_type":"int","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter<BangGroup>(BangGroup.values)","dart_type_name":"BangGroup"}},{"name":"additional_trigger","getter_name":"additionalTrigger","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":["PRIMARY KEY(\"trigger\", \"group\", additional_trigger)","FOREIGN KEY(\"trigger\", \"group\")REFERENCES bang(\"trigger\", \"group\")ON DELETE CASCADE"],"explicit_pk":["trigger","group","additional_trigger"]}},{"id":2,"references":[1],"type":"index","data":{"on":1,"name":"idx_bang_triggers_lookup","sql":"CREATE INDEX idx_bang_triggers_lookup ON bang_triggers (additional_trigger, \"group\");","unique":false,"columns":[]}},{"id":3,"references":[0,1],"type":"trigger","data":{"on":0,"references_in_body":[0,1],"name":"bang_triggers_after_insert","sql":"CREATE TRIGGER bang_triggers_after_insert AFTER INSERT ON bang \nWHEN new.additional_triggers IS NOT NULL\nBEGIN\n INSERT INTO bang_triggers(\"trigger\", \"group\", additional_trigger)\n SELECT \n new.\"trigger\",\n new.\"group\",\n json_each.value\n FROM json_each(new.additional_triggers);\nEND;"}},{"id":4,"references":[0,1],"type":"trigger","data":{"on":0,"references_in_body":[0,1],"name":"bang_triggers_after_update","sql":"CREATE TRIGGER bang_triggers_after_update AFTER UPDATE ON bang BEGIN\n -- Delete old additional triggers\n DELETE FROM bang_triggers \n WHERE \"trigger\" = old.\"trigger\" AND \"group\" = old.\"group\";\n\n -- Insert new additional triggers if they exist\n INSERT INTO bang_triggers(\"trigger\", \"group\", additional_trigger)\n SELECT \n new.\"trigger\",\n new.\"group\",\n json_each.value\n FROM json_each(new.additional_triggers)\n WHERE new.additional_triggers IS NOT NULL;\nEND;"}},{"id":5,"references":[],"type":"table","data":{"name":"bang_sync","was_declared_in_moor":true,"columns":[{"name":"group","getter_naLine truncated
|
||||
{
|
||||
"_meta": {
|
||||
"description": "This file contains a serialized version of schema entities for drift.",
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"options": {
|
||||
"store_date_time_values_as_text": false
|
||||
},
|
||||
"entities": [
|
||||
{
|
||||
"id": 0,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "bang",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "trigger",
|
||||
"getter_name": "trigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "group",
|
||||
"getter_name": "group",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const EnumIndexConverter<BangGroup>(BangGroup.values)",
|
||||
"dart_type_name": "BangGroup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "website_name",
|
||||
"getter_name": "websiteName",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "domain",
|
||||
"getter_name": "domain",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "url_template",
|
||||
"getter_name": "urlTemplate",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "category",
|
||||
"getter_name": "category",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "sub_category",
|
||||
"getter_name": "subCategory",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "format",
|
||||
"getter_name": "format",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const BangFormatConverter()",
|
||||
"dart_type_name": "Set<BangFormat>?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "additional_triggers",
|
||||
"getter_name": "additionalTriggers",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const TriggerListConverter()",
|
||||
"dart_type_name": "Set<String>?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "searxng_api",
|
||||
"getter_name": "searxngApi",
|
||||
"moor_type": "bool",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL DEFAULT FALSE",
|
||||
"default_dart": "const CustomExpression('FALSE')",
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": [
|
||||
"PRIMARY KEY(\"trigger\", \"group\")"
|
||||
],
|
||||
"explicit_pk": [
|
||||
"trigger",
|
||||
"group"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"references": [
|
||||
0
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "bang_triggers",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "trigger",
|
||||
"getter_name": "trigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "group",
|
||||
"getter_name": "group",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const EnumIndexConverter<BangGroup>(BangGroup.values)",
|
||||
"dart_type_name": "BangGroup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "additional_trigger",
|
||||
"getter_name": "additionalTrigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": [
|
||||
"PRIMARY KEY(\"trigger\", \"group\", additional_trigger)",
|
||||
"FOREIGN KEY(\"trigger\", \"group\")REFERENCES bang(\"trigger\", \"group\")ON DELETE CASCADE"
|
||||
],
|
||||
"explicit_pk": [
|
||||
"trigger",
|
||||
"group",
|
||||
"additional_trigger"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"references": [
|
||||
1
|
||||
],
|
||||
"type": "index",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"name": "idx_bang_triggers_lookup",
|
||||
"sql": "CREATE INDEX idx_bang_triggers_lookup ON bang_triggers (additional_trigger, \"group\");",
|
||||
"unique": false,
|
||||
"columns": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"references": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 0,
|
||||
"references_in_body": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"name": "bang_triggers_after_insert",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_insert AFTER INSERT ON bang \nWHEN new.additional_triggers IS NOT NULL\nBEGIN\n INSERT INTO bang_triggers(\"trigger\", \"group\", additional_trigger)\n SELECT \n new.\"trigger\",\n new.\"group\",\n json_each.value\n FROM json_each(new.additional_triggers);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"references": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 0,
|
||||
"references_in_body": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"name": "bang_triggers_after_update",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_update AFTER UPDATE ON bang BEGIN\n -- Delete old additional triggers\n DELETE FROM bang_triggers \n WHERE \"trigger\" = old.\"trigger\" AND \"group\" = old.\"group\";\n\n -- Insert new additional triggers if they exist\n INSERT INTO bang_triggers(\"trigger\", \"group\", additional_trigger)\n SELECT \n new.\"trigger\",\n new.\"group\",\n json_each.value\n FROM json_each(new.additional_triggers)\n WHERE new.additional_triggers IS NOT NULL;\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "bang_sync",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "group",
|
||||
"getter_name": "group",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
],
|
||||
"type_converter": {
|
||||
"dart_expr": "const EnumIndexConverter<BangGroup>(BangGroup.values)",
|
||||
"dart_type_name": "BangGroup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "last_sync",
|
||||
"getter_name": "lastSync",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"references": [
|
||||
0
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "bang_frequency",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "trigger",
|
||||
"getter_name": "trigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "group",
|
||||
"getter_name": "group",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const EnumIndexConverter<BangGroup>(BangGroup.values)",
|
||||
"dart_type_name": "BangGroup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "frequency",
|
||||
"getter_name": "frequency",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "last_used",
|
||||
"getter_name": "lastUsed",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": [
|
||||
"PRIMARY KEY(\"trigger\", \"group\")",
|
||||
"FOREIGN KEY(\"trigger\", \"group\")REFERENCES bang(\"trigger\", \"group\")ON DELETE CASCADE"
|
||||
],
|
||||
"explicit_pk": [
|
||||
"trigger",
|
||||
"group"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"references": [
|
||||
0
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "bang_history",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "search_query",
|
||||
"getter_name": "searchQuery",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "UNIQUE NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"unique"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "trigger",
|
||||
"getter_name": "trigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "group",
|
||||
"getter_name": "group",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const EnumIndexConverter<BangGroup>(BangGroup.values)",
|
||||
"dart_type_name": "BangGroup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "search_date",
|
||||
"getter_name": "searchDate",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": [
|
||||
"FOREIGN KEY(\"trigger\", \"group\")REFERENCES bang(\"trigger\", \"group\")ON DELETE CASCADE"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"references": [
|
||||
0
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "bang_fts",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "trigger",
|
||||
"getter_name": "trigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "website_name",
|
||||
"getter_name": "websiteName",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": true,
|
||||
"create_virtual_stmt": "CREATE VIRTUAL TABLE \"bang_fts\" USING fts5(trigger, website_name, content=bang, prefix='2 3')",
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"references": [
|
||||
1
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "bang_triggers_fts",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "additional_trigger",
|
||||
"getter_name": "additionalTrigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": true,
|
||||
"create_virtual_stmt": "CREATE VIRTUAL TABLE \"bang_triggers_fts\" USING fts5(additional_trigger, content=bang_triggers, prefix='2 3')",
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"references": [
|
||||
0,
|
||||
6
|
||||
],
|
||||
"type": "view",
|
||||
"data": {
|
||||
"name": "bang_data_view",
|
||||
"sql": "CREATE VIEW bang_data_view AS SELECT b.*, bf.frequency, bf.last_used FROM bang AS b LEFT JOIN bang_frequency AS bf ON b.\"trigger\" = bf.\"trigger\" AND b.\"group\" = bf.\"group\"",
|
||||
"dart_info_name": "BangDataView",
|
||||
"columns": [
|
||||
{
|
||||
"name": "trigger",
|
||||
"getter_name": "trigger",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "group",
|
||||
"getter_name": "group",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const EnumIndexConverter<BangGroup>(BangGroup.values)",
|
||||
"dart_type_name": "BangGroup"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "website_name",
|
||||
"getter_name": "websiteName",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "domain",
|
||||
"getter_name": "domain",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "url_template",
|
||||
"getter_name": "urlTemplate",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "category",
|
||||
"getter_name": "category",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "sub_category",
|
||||
"getter_name": "subCategory",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "format",
|
||||
"getter_name": "format",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const BangFormatConverter()",
|
||||
"dart_type_name": "Set<BangFormat>?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "additional_triggers",
|
||||
"getter_name": "additionalTriggers",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const TriggerListConverter()",
|
||||
"dart_type_name": "Set<String>?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "searxng_api",
|
||||
"getter_name": "searxngApi",
|
||||
"moor_type": "bool",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"defaultConstraints": "CHECK (\"searxng_api\" IN (0, 1))",
|
||||
"dialectAwareDefaultConstraints": {
|
||||
"sqlite": "CHECK (\"searxng_api\" IN (0, 1))"
|
||||
},
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "frequency",
|
||||
"getter_name": "frequency",
|
||||
"moor_type": "int",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "last_used",
|
||||
"getter_name": "lastUsed",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"references": [
|
||||
0,
|
||||
8
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 0,
|
||||
"references_in_body": [
|
||||
0,
|
||||
8
|
||||
],
|
||||
"name": "bang_after_insert",
|
||||
"sql": "CREATE TRIGGER bang_after_insert AFTER INSERT ON bang BEGIN\n INSERT INTO \n bang_fts(rowid, \"trigger\", website_name) \n VALUES (new.rowid, new.\"trigger\", new.website_name);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"references": [
|
||||
0,
|
||||
8
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 0,
|
||||
"references_in_body": [
|
||||
0,
|
||||
8
|
||||
],
|
||||
"name": "bang_after_delete",
|
||||
"sql": "CREATE TRIGGER bang_after_delete AFTER DELETE ON bang BEGIN\n INSERT INTO \n bang_fts(bang_fts, rowid, \"trigger\", website_name) \n VALUES('delete', old.rowid, old.\"trigger\", old.website_name);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"references": [
|
||||
0,
|
||||
8
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 0,
|
||||
"references_in_body": [
|
||||
0,
|
||||
8
|
||||
],
|
||||
"name": "bang_after_update",
|
||||
"sql": "CREATE TRIGGER bang_after_update AFTER UPDATE ON bang BEGIN\n INSERT INTO \n bang_fts(bang_fts, rowid, \"trigger\", website_name) \n VALUES('delete', old.rowid, old.\"trigger\", old.website_name);\n INSERT INTO \n bang_fts(rowid, \"trigger\", website_name) \n VALUES (new.rowid, new.\"trigger\", new.website_name);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"references": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"name": "bang_triggers_after_insert_fts",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_insert_fts AFTER INSERT ON bang_triggers BEGIN\n INSERT INTO \n bang_triggers_fts(rowid, additional_trigger) \n VALUES (new.rowid, new.additional_trigger);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"references": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"name": "bang_triggers_after_delete_fts",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_delete_fts AFTER DELETE ON bang_triggers BEGIN\n INSERT INTO \n bang_triggers_fts(bang_triggers_fts, rowid, additional_trigger) \n VALUES('delete', old.rowid, old.additional_trigger);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"references": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"name": "bang_triggers_after_update_fts",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_update_fts AFTER UPDATE ON bang_triggers BEGIN\n INSERT INTO \n bang_triggers_fts(bang_triggers_fts, rowid, additional_trigger) \n VALUES('delete', old.rowid, old.additional_trigger);\n INSERT INTO \n bang_triggers_fts(rowid, additional_trigger) \n VALUES (new.rowid, new.additional_trigger);\nEND;"
|
||||
}
|
||||
}
|
||||
],
|
||||
"fixed_sql": [
|
||||
{
|
||||
"name": "bang",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"bang\" (\"trigger\" TEXT NOT NULL, \"group\" INTEGER NOT NULL, \"website_name\" TEXT NOT NULL, \"domain\" TEXT NOT NULL, \"url_template\" TEXT NOT NULL, \"category\" TEXT, \"sub_category\" TEXT, \"format\" TEXT, \"additional_triggers\" TEXT, \"searxng_api\" INTEGER NOT NULL DEFAULT FALSE, PRIMARY KEY(\"trigger\", \"group\"));"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_triggers",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"bang_triggers\" (\"trigger\" TEXT NOT NULL, \"group\" INTEGER NOT NULL, \"additional_trigger\" TEXT NOT NULL, PRIMARY KEY(\"trigger\", \"group\", additional_trigger), FOREIGN KEY(\"trigger\", \"group\")REFERENCES bang(\"trigger\", \"group\")ON DELETE CASCADE);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_bang_triggers_lookup",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE INDEX idx_bang_triggers_lookup ON bang_triggers (additional_trigger, \"group\")"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_triggers_after_insert",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_insert AFTER INSERT ON bang WHEN new.additional_triggers IS NOT NULL BEGIN INSERT INTO bang_triggers (\"trigger\", \"group\", additional_trigger) SELECT new.\"trigger\", new.\"group\", json_each.value FROM json_each(new.additional_triggers);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_triggers_after_update",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_update AFTER UPDATE ON bang BEGIN DELETE FROM bang_triggers WHERE \"trigger\" = old.\"trigger\" AND \"group\" = old.\"group\";INSERT INTO bang_triggers (\"trigger\", \"group\", additional_trigger) SELECT new.\"trigger\", new.\"group\", json_each.value FROM json_each(new.additional_triggers)WHERE new.additional_triggers IS NOT NULL;END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_sync",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"bang_sync\" (\"group\" INTEGER PRIMARY KEY NOT NULL, \"last_sync\" INTEGER NOT NULL);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_frequency",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"bang_frequency\" (\"trigger\" TEXT NOT NULL, \"group\" INTEGER NOT NULL, \"frequency\" INTEGER NOT NULL, \"last_used\" INTEGER NOT NULL, PRIMARY KEY(\"trigger\", \"group\"), FOREIGN KEY(\"trigger\", \"group\")REFERENCES bang(\"trigger\", \"group\")ON DELETE CASCADE);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_history",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"bang_history\" (\"search_query\" TEXT UNIQUE NOT NULL, \"trigger\" TEXT NOT NULL, \"group\" INTEGER NOT NULL, \"search_date\" INTEGER NOT NULL, FOREIGN KEY(\"trigger\", \"group\")REFERENCES bang(\"trigger\", \"group\")ON DELETE CASCADE);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_fts",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE VIRTUAL TABLE IF NOT EXISTS \"bang_fts\" USING fts5(trigger, website_name, content=bang, prefix='2 3');"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_triggers_fts",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE VIRTUAL TABLE IF NOT EXISTS \"bang_triggers_fts\" USING fts5(additional_trigger, content=bang_triggers, prefix='2 3');"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_data_view",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE VIEW bang_data_view AS SELECT b.*, bf.frequency, bf.last_used FROM bang AS b LEFT JOIN bang_frequency AS bf ON b.\"trigger\" = bf.\"trigger\" AND b.\"group\" = bf.\"group\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_after_insert",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_after_insert AFTER INSERT ON bang BEGIN INSERT INTO bang_fts (\"rowid\", \"trigger\", website_name) VALUES (new.\"rowid\", new.\"trigger\", new.website_name);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_after_delete",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_after_delete AFTER DELETE ON bang BEGIN INSERT INTO bang_fts (bang_fts, \"rowid\", \"trigger\", website_name) VALUES ('delete', old.\"rowid\", old.\"trigger\", old.website_name);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_after_update",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_after_update AFTER UPDATE ON bang BEGIN INSERT INTO bang_fts (bang_fts, \"rowid\", \"trigger\", website_name) VALUES ('delete', old.\"rowid\", old.\"trigger\", old.website_name);INSERT INTO bang_fts (\"rowid\", \"trigger\", website_name) VALUES (new.\"rowid\", new.\"trigger\", new.website_name);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_triggers_after_insert_fts",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_insert_fts AFTER INSERT ON bang_triggers BEGIN INSERT INTO bang_triggers_fts (\"rowid\", additional_trigger) VALUES (new.\"rowid\", new.additional_trigger);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_triggers_after_delete_fts",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_delete_fts AFTER DELETE ON bang_triggers BEGIN INSERT INTO bang_triggers_fts (bang_triggers_fts, \"rowid\", additional_trigger) VALUES ('delete', old.\"rowid\", old.additional_trigger);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bang_triggers_after_update_fts",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER bang_triggers_after_update_fts AFTER UPDATE ON bang_triggers BEGIN INSERT INTO bang_triggers_fts (bang_triggers_fts, \"rowid\", additional_trigger) VALUES ('delete', old.\"rowid\", old.additional_trigger);INSERT INTO bang_triggers_fts (\"rowid\", additional_trigger) VALUES (new.\"rowid\", new.additional_trigger);END"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +1,417 @@
|
||||
{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"container","was_declared_in_moor":true,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":"PRIMARY KEY NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":["primary-key"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"color","getter_name":"color","moor_type":"int","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const ColorConverter()","dart_type_name":"Color"}},{"name":"metadata","getter_name":"metadata","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const ContainerMetadataConverter()","dart_type_name":"ContainerMetadata"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[0],"type":"table","data":{"name":"tab","was_declared_in_moor":true,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":"PRIMARY KEY NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":["primary-key"]},{"name":"parent_id","getter_name":"parentId","moor_type":"string","nullable":true,"customConstraints":"REFERENCES tab(id)ON DELETE SET NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"container_id","getter_name":"containerId","moor_type":"string","nullable":true,"customConstraints":"REFERENCES container(id)ON DELETE CASCADE","default_dart":null,"default_client_dart":null,"dsl_features":[{"foreign_key":{"to":{"table":"container","column":"id"},"initially_deferred":false,"on_update":null,"on_delete":"cascade"}}]},{"name":"order_key","getter_name":"orderKey","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"url","getter_name":"url","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const UriConverterNullable()","dart_type_name":"Uri?"}},{"name":"title","getter_name":"title","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_probably_readerable","getter_name":"isProbablyReaderable","moor_type":"bool","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extracted_content_markdown","getter_name":"extractedContentMarkdown","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extracted_content_plain","getter_name":"extractedContentPlain","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"full_content_markdown","getter_name":"fullContentMarkdown","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"full_content_plain","getter_name":"fullContentPlain","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"timestamp","getter_name":"timestamp","moor_type":"dateTime","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[1],"type":"table","data":{"name":"tab_fts","was_declared_in_moor":true,"columns":[{"name":"title","getter_name":"title","moor_type":"string","nullable":false,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"url","getter_name":"url","moor_type":"string","nullable":false,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"extracted_content_plain","getter_name":"extractedContentPlain","moor_type":"string","nullable":false,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"full_content_plain","getter_name":"fullContentPlain","moor_type":"string","nullable":false,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":true,"create_virtual_stmt":"CREATE VIRTUAL TABLE \"tab_fts\" USING fts5(title, url, extracted_content_plain, full_content_plain, content=tab, tokenize=\"trigram\")","without_rowid":false,"constraints":[]}},{"id":3,"references":[1],"type":"trigger","data":{"on":1,"references_in_body":[1],"nLine truncated
|
||||
{
|
||||
"_meta": {
|
||||
"description": "This file contains a serialized version of schema entities for drift.",
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"options": {
|
||||
"store_date_time_values_as_text": false
|
||||
},
|
||||
"entities": [
|
||||
{
|
||||
"id": 0,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "container",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "id",
|
||||
"getter_name": "id",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"getter_name": "name",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"getter_name": "color",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const ColorConverter()",
|
||||
"dart_type_name": "Color"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"getter_name": "metadata",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const ContainerMetadataConverter()",
|
||||
"dart_type_name": "ContainerMetadata"
|
||||
}
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"references": [
|
||||
0
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "tab",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "id",
|
||||
"getter_name": "id",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parent_id",
|
||||
"getter_name": "parentId",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "REFERENCES tab(id)ON DELETE SET NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "container_id",
|
||||
"getter_name": "containerId",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "REFERENCES container(id)ON DELETE CASCADE",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
{
|
||||
"foreign_key": {
|
||||
"to": {
|
||||
"table": "container",
|
||||
"column": "id"
|
||||
},
|
||||
"initially_deferred": false,
|
||||
"on_update": null,
|
||||
"on_delete": "cascade"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "order_key",
|
||||
"getter_name": "orderKey",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"getter_name": "url",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverterNullable()",
|
||||
"dart_type_name": "Uri?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"getter_name": "title",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "is_probably_readerable",
|
||||
"getter_name": "isProbablyReaderable",
|
||||
"moor_type": "bool",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "extracted_content_markdown",
|
||||
"getter_name": "extractedContentMarkdown",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "extracted_content_plain",
|
||||
"getter_name": "extractedContentPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "full_content_markdown",
|
||||
"getter_name": "fullContentMarkdown",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "full_content_plain",
|
||||
"getter_name": "fullContentPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "timestamp",
|
||||
"getter_name": "timestamp",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"references": [
|
||||
1
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "tab_fts",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "title",
|
||||
"getter_name": "title",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"getter_name": "url",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "extracted_content_plain",
|
||||
"getter_name": "extractedContentPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "full_content_plain",
|
||||
"getter_name": "fullContentPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": true,
|
||||
"create_virtual_stmt": "CREATE VIRTUAL TABLE \"tab_fts\" USING fts5(title, url, extracted_content_plain, full_content_plain, content=tab, tokenize=\"trigram\")",
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"references": [
|
||||
1
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1
|
||||
],
|
||||
"name": "tab_maintain_parent_chain_on_delete",
|
||||
"sql": "CREATE TRIGGER tab_maintain_parent_chain_on_delete BEFORE DELETE ON tab BEGIN\n -- Update all children of the deleted row to point to its parent\n UPDATE tab \n SET parent_id = OLD.parent_id \n WHERE parent_id = OLD.id;\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"references": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"name": "tab_after_insert",
|
||||
"sql": "CREATE TRIGGER tab_after_insert AFTER INSERT ON tab BEGIN\n INSERT INTO \n tab_fts(rowid, title, url, extracted_content_plain, full_content_plain) \n VALUES (new.rowid, new.title, new.url, new.extracted_content_plain, new.full_content_plain);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"references": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"name": "tab_after_delete",
|
||||
"sql": "CREATE TRIGGER tab_after_delete AFTER DELETE ON tab BEGIN\n INSERT INTO \n tab_fts(tab_fts, rowid, title, url, extracted_content_plain, full_content_plain) \n VALUES('delete', old.rowid, old.title, old.url, old.extracted_content_plain, old.full_content_plain);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"references": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
2
|
||||
],
|
||||
"name": "tab_after_update",
|
||||
"sql": "CREATE TRIGGER tab_after_update AFTER UPDATE ON tab BEGIN\n INSERT INTO \n tab_fts(tab_fts, rowid, title, url, extracted_content_plain, full_content_plain) \n VALUES('delete', old.rowid, old.title, old.url, old.extracted_content_plain, old.full_content_plain);\n INSERT INTO \n tab_fts(rowid, title, url, extracted_content_plain, full_content_plain) \n VALUES (new.rowid, new.title, new.url, new.extracted_content_plain, new.full_content_plain);\nEND;"
|
||||
}
|
||||
}
|
||||
],
|
||||
"fixed_sql": [
|
||||
{
|
||||
"name": "container",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"container\" (\"id\" TEXT PRIMARY KEY NOT NULL, \"name\" TEXT, \"color\" INTEGER NOT NULL, \"metadata\" TEXT);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tab",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"tab\" (\"id\" TEXT PRIMARY KEY NOT NULL, \"parent_id\" TEXT REFERENCES tab(id)ON DELETE SET NULL, \"container_id\" TEXT REFERENCES container(id)ON DELETE CASCADE, \"order_key\" TEXT NOT NULL, \"url\" TEXT, \"title\" TEXT, \"is_probably_readerable\" INTEGER, \"extracted_content_markdown\" TEXT, \"extracted_content_plain\" TEXT, \"full_content_markdown\" TEXT, \"full_content_plain\" TEXT, \"timestamp\" INTEGER NOT NULL);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tab_fts",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE VIRTUAL TABLE IF NOT EXISTS \"tab_fts\" USING fts5(title, url, extracted_content_plain, full_content_plain, content=tab, tokenize=\"trigram\");"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tab_maintain_parent_chain_on_delete",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER tab_maintain_parent_chain_on_delete BEFORE DELETE ON tab BEGIN UPDATE tab SET parent_id = OLD.parent_id WHERE parent_id = OLD.id;END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tab_after_insert",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER tab_after_insert AFTER INSERT ON tab BEGIN INSERT INTO tab_fts (\"rowid\", title, url, extracted_content_plain, full_content_plain) VALUES (new.\"rowid\", new.title, new.url, new.extracted_content_plain, new.full_content_plain);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tab_after_delete",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER tab_after_delete AFTER DELETE ON tab BEGIN INSERT INTO tab_fts (tab_fts, \"rowid\", title, url, extracted_content_plain, full_content_plain) VALUES ('delete', old.\"rowid\", old.title, old.url, old.extracted_content_plain, old.full_content_plain);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tab_after_update",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER tab_after_update AFTER UPDATE ON tab BEGIN INSERT INTO tab_fts (tab_fts, \"rowid\", title, url, extracted_content_plain, full_content_plain) VALUES ('delete', old.\"rowid\", old.title, old.url, old.extracted_content_plain, old.full_content_plain);INSERT INTO tab_fts (\"rowid\", title, url, extracted_content_plain, full_content_plain) VALUES (new.\"rowid\", new.title, new.url, new.extracted_content_plain, new.full_content_plain);END"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +1,232 @@
|
||||
{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"setting","was_declared_in_moor":true,"columns":[{"name":"key","getter_name":"key","moor_type":"string","nullable":false,"customConstraints":"PRIMARY KEY NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":["primary-key"]},{"name":"partition_key","getter_name":"partitionKey","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"value","getter_name":"value","moor_type":"any","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"strict":true}},{"id":1,"references":[],"type":"table","data":{"name":"icon_cache","was_declared_in_moor":true,"columns":[{"name":"origin","getter_name":"origin","moor_type":"string","nullable":false,"customConstraints":"PRIMARY KEY NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":["primary-key"]},{"name":"icon_data","getter_name":"iconData","moor_type":"blob","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"fetch_date","getter_name":"fetchDate","moor_type":"dateTime","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":2,"references":[],"type":"table","data":{"name":"onboarding","was_declared_in_moor":true,"columns":[{"name":"revision","getter_name":"revision","moor_type":"int","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"completion_date","getter_name":"completionDate","moor_type":"dateTime","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":3,"references":[],"type":"table","data":{"name":"riverpod","was_declared_in_moor":true,"columns":[{"name":"key","getter_name":"key","moor_type":"string","nullable":false,"customConstraints":"PRIMARY KEY NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":["primary-key"]},{"name":"json","getter_name":"json","moor_type":"string","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"expireAt","getter_name":"expireAt","moor_type":"dateTime","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"destroyKey","getter_name":"destroyKey","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[]}}]}
|
||||
{
|
||||
"_meta": {
|
||||
"description": "This file contains a serialized version of schema entities for drift.",
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"options": {
|
||||
"store_date_time_values_as_text": false
|
||||
},
|
||||
"entities": [
|
||||
{
|
||||
"id": 0,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "setting",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "key",
|
||||
"getter_name": "key",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "partition_key",
|
||||
"getter_name": "partitionKey",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"getter_name": "value",
|
||||
"moor_type": "any",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": [],
|
||||
"strict": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "icon_cache",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "origin",
|
||||
"getter_name": "origin",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "icon_data",
|
||||
"getter_name": "iconData",
|
||||
"moor_type": "blob",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "fetch_date",
|
||||
"getter_name": "fetchDate",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "onboarding",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "revision",
|
||||
"getter_name": "revision",
|
||||
"moor_type": "int",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "completion_date",
|
||||
"getter_name": "completionDate",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "riverpod",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "key",
|
||||
"getter_name": "key",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "json",
|
||||
"getter_name": "json",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "expireAt",
|
||||
"getter_name": "expireAt",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "destroyKey",
|
||||
"getter_name": "destroyKey",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": true,
|
||||
"constraints": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"fixed_sql": [
|
||||
{
|
||||
"name": "setting",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"setting\" (\"key\" TEXT PRIMARY KEY NOT NULL, \"partition_key\" TEXT, \"value\" ANY) STRICT;"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "icon_cache",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"icon_cache\" (\"origin\" TEXT PRIMARY KEY NOT NULL, \"icon_data\" BLOB NOT NULL, \"fetch_date\" INTEGER NOT NULL);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "onboarding",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"onboarding\" (\"revision\" INTEGER NOT NULL, \"completion_date\" INTEGER NOT NULL);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "riverpod",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"riverpod\" (\"key\" TEXT PRIMARY KEY NOT NULL, \"json\" TEXT NOT NULL, \"expireAt\" INTEGER, \"destroyKey\" TEXT) WITHOUT ROWID;"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +1,738 @@
|
||||
{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"feed","was_declared_in_moor":true,"columns":[{"name":"url","getter_name":"url","moor_type":"string","nullable":false,"customConstraints":"PRIMARY KEY NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":["primary-key"],"type_converter":{"dart_expr":"const UriConverter()","dart_type_name":"Uri"}},{"name":"title","getter_name":"title","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"description","getter_name":"description","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"icon","getter_name":"icon","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const UriConverterNullable()","dart_type_name":"Uri?"}},{"name":"site_link","getter_name":"siteLink","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const UriConverterNullable()","dart_type_name":"Uri?"}},{"name":"authors","getter_name":"authors","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const FeedAuthorsConverter()","dart_type_name":"List<FeedAuthor>"}},{"name":"tags","getter_name":"tags","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const FeedCategoriesConverter()","dart_type_name":"List<FeedCategory>"}},{"name":"last_fetched","getter_name":"lastFetched","moor_type":"dateTime","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[0],"type":"table","data":{"name":"article","was_declared_in_moor":true,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":"PRIMARY KEY NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":["primary-key"]},{"name":"feed_id","getter_name":"feedId","moor_type":"string","nullable":false,"customConstraints":"NOT NULL REFERENCES feed(url)ON DELETE CASCADE","default_dart":null,"default_client_dart":null,"dsl_features":[{"foreign_key":{"to":{"table":"feed","column":"url"},"initially_deferred":false,"on_update":null,"on_delete":"cascade"}}],"type_converter":{"dart_expr":"const UriConverter()","dart_type_name":"Uri"}},{"name":"fetched","getter_name":"fetched","moor_type":"dateTime","nullable":false,"customConstraints":"NOT NULL","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created","getter_name":"created","moor_type":"dateTime","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"updated","getter_name":"updated","moor_type":"dateTime","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"last_read","getter_name":"lastRead","moor_type":"dateTime","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"title","getter_name":"title","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"authors","getter_name":"authors","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const FeedAuthorsConverter()","dart_type_name":"List<FeedAuthor>"}},{"name":"tags","getter_name":"tags","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const FeedCategoriesConverter()","dart_type_name":"List<FeedCategory>"}},{"name":"links","getter_name":"links","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const FeedLinksConverter()","dart_type_name":"List<FeedLink>"}},{"name":"summaryHtml","getter_name":"summaryHtml","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"summaryMarkdown","getter_name":"summaryMarkdown","moor_type":"string","nullable":true,"customConstraints":"","default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"summaryPlain","getter_name":"summaryPlain","moor_type":"string","nullable":true,"customConstraints":"","default_dLine truncated
|
||||
{
|
||||
"_meta": {
|
||||
"description": "This file contains a serialized version of schema entities for drift.",
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"options": {
|
||||
"store_date_time_values_as_text": false
|
||||
},
|
||||
"entities": [
|
||||
{
|
||||
"id": 0,
|
||||
"references": [],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "feed",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "url",
|
||||
"getter_name": "url",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverter()",
|
||||
"dart_type_name": "Uri"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"getter_name": "title",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"getter_name": "description",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "icon",
|
||||
"getter_name": "icon",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverterNullable()",
|
||||
"dart_type_name": "Uri?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "site_link",
|
||||
"getter_name": "siteLink",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverterNullable()",
|
||||
"dart_type_name": "Uri?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "authors",
|
||||
"getter_name": "authors",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedAuthorsConverter()",
|
||||
"dart_type_name": "List<FeedAuthor>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tags",
|
||||
"getter_name": "tags",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedCategoriesConverter()",
|
||||
"dart_type_name": "List<FeedCategory>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "last_fetched",
|
||||
"getter_name": "lastFetched",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"references": [
|
||||
0
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "article",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "id",
|
||||
"getter_name": "id",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "PRIMARY KEY NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
"primary-key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "feed_id",
|
||||
"getter_name": "feedId",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL REFERENCES feed(url)ON DELETE CASCADE",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [
|
||||
{
|
||||
"foreign_key": {
|
||||
"to": {
|
||||
"table": "feed",
|
||||
"column": "url"
|
||||
},
|
||||
"initially_deferred": false,
|
||||
"on_update": null,
|
||||
"on_delete": "cascade"
|
||||
}
|
||||
}
|
||||
],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverter()",
|
||||
"dart_type_name": "Uri"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fetched",
|
||||
"getter_name": "fetched",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": "NOT NULL",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "created",
|
||||
"getter_name": "created",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "updated",
|
||||
"getter_name": "updated",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "last_read",
|
||||
"getter_name": "lastRead",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"getter_name": "title",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "authors",
|
||||
"getter_name": "authors",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedAuthorsConverter()",
|
||||
"dart_type_name": "List<FeedAuthor>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tags",
|
||||
"getter_name": "tags",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedCategoriesConverter()",
|
||||
"dart_type_name": "List<FeedCategory>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "links",
|
||||
"getter_name": "links",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedLinksConverter()",
|
||||
"dart_type_name": "List<FeedLink>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "summaryHtml",
|
||||
"getter_name": "summaryHtml",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "summaryMarkdown",
|
||||
"getter_name": "summaryMarkdown",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "summaryPlain",
|
||||
"getter_name": "summaryPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "contentHtml",
|
||||
"getter_name": "contentHtml",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "contentMarkdown",
|
||||
"getter_name": "contentMarkdown",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "contentPlain",
|
||||
"getter_name": "contentPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": false,
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"references": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"type": "view",
|
||||
"data": {
|
||||
"name": "article_view",
|
||||
"sql": "CREATE VIEW article_view AS SELECT a.*, f.icon, f.site_link FROM article AS a INNER JOIN feed AS f ON f.url = a.feed_id",
|
||||
"dart_info_name": "ArticleView",
|
||||
"columns": [
|
||||
{
|
||||
"name": "id",
|
||||
"getter_name": "id",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "feed_id",
|
||||
"getter_name": "feedId",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverter()",
|
||||
"dart_type_name": "Uri"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fetched",
|
||||
"getter_name": "fetched",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": false,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "created",
|
||||
"getter_name": "created",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "updated",
|
||||
"getter_name": "updated",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "last_read",
|
||||
"getter_name": "lastRead",
|
||||
"moor_type": "dateTime",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"getter_name": "title",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "authors",
|
||||
"getter_name": "authors",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedAuthorsConverter()",
|
||||
"dart_type_name": "List<FeedAuthor>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "tags",
|
||||
"getter_name": "tags",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedCategoriesConverter()",
|
||||
"dart_type_name": "List<FeedCategory>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "links",
|
||||
"getter_name": "links",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const FeedLinksConverter()",
|
||||
"dart_type_name": "List<FeedLink>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "summaryHtml",
|
||||
"getter_name": "summaryHtml",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "summaryMarkdown",
|
||||
"getter_name": "summaryMarkdown",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "summaryPlain",
|
||||
"getter_name": "summaryPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "contentHtml",
|
||||
"getter_name": "contentHtml",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "contentMarkdown",
|
||||
"getter_name": "contentMarkdown",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "contentPlain",
|
||||
"getter_name": "contentPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "icon",
|
||||
"getter_name": "icon",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverterNullable()",
|
||||
"dart_type_name": "Uri?"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "site_link",
|
||||
"getter_name": "siteLink",
|
||||
"moor_type": "string",
|
||||
"nullable": true,
|
||||
"customConstraints": null,
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": [],
|
||||
"type_converter": {
|
||||
"dart_expr": "const UriConverterNullable()",
|
||||
"dart_type_name": "Uri?"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"references": [
|
||||
1
|
||||
],
|
||||
"type": "index",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"name": "article_feed_id",
|
||||
"sql": "CREATE INDEX article_feed_id ON article (feed_id);",
|
||||
"unique": false,
|
||||
"columns": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"references": [
|
||||
1
|
||||
],
|
||||
"type": "table",
|
||||
"data": {
|
||||
"name": "article_fts",
|
||||
"was_declared_in_moor": true,
|
||||
"columns": [
|
||||
{
|
||||
"name": "title",
|
||||
"getter_name": "title",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "summaryPlain",
|
||||
"getter_name": "summaryPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
},
|
||||
{
|
||||
"name": "contentPlain",
|
||||
"getter_name": "contentPlain",
|
||||
"moor_type": "string",
|
||||
"nullable": false,
|
||||
"customConstraints": "",
|
||||
"default_dart": null,
|
||||
"default_client_dart": null,
|
||||
"dsl_features": []
|
||||
}
|
||||
],
|
||||
"is_virtual": true,
|
||||
"create_virtual_stmt": "CREATE VIRTUAL TABLE \"article_fts\" USING fts5(title, summaryPlain, contentPlain, content=article, tokenize=\"trigram\")",
|
||||
"without_rowid": false,
|
||||
"constraints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"references": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"name": "article_after_insert",
|
||||
"sql": "CREATE TRIGGER article_after_insert AFTER INSERT ON article BEGIN\n INSERT INTO \n article_fts(rowid, title, summaryPlain, contentPlain) \n VALUES (new.rowid, new.title, new.summaryPlain, new.contentPlain);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"references": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"name": "article_after_delete",
|
||||
"sql": "CREATE TRIGGER article_after_delete AFTER DELETE ON article BEGIN\n INSERT INTO \n article_fts(article_fts, rowid, title, summaryPlain, contentPlain) \n VALUES('delete', old.rowid, old.title, old.summaryPlain, old.contentPlain);\nEND;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"references": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"type": "trigger",
|
||||
"data": {
|
||||
"on": 1,
|
||||
"references_in_body": [
|
||||
1,
|
||||
4
|
||||
],
|
||||
"name": "article_after_update",
|
||||
"sql": "CREATE TRIGGER article_after_update AFTER UPDATE ON article BEGIN\n INSERT INTO \n article_fts(article_fts, rowid, title, summaryPlain, contentPlain) \n VALUES('delete', old.rowid, old.title, old.summaryPlain, old.contentPlain);\n INSERT INTO \n article_fts(rowid, title, summaryPlain, contentPlain) \n VALUES (new.rowid, new.title, new.summaryPlain, new.contentPlain);\nEND;"
|
||||
}
|
||||
}
|
||||
],
|
||||
"fixed_sql": [
|
||||
{
|
||||
"name": "feed",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"feed\" (\"url\" TEXT PRIMARY KEY NOT NULL, \"title\" TEXT, \"description\" TEXT, \"icon\" TEXT, \"site_link\" TEXT, \"authors\" TEXT, \"tags\" TEXT, \"last_fetched\" INTEGER);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "article",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TABLE IF NOT EXISTS \"article\" (\"id\" TEXT PRIMARY KEY NOT NULL, \"feed_id\" TEXT NOT NULL REFERENCES feed(url)ON DELETE CASCADE, \"fetched\" INTEGER NOT NULL, \"created\" INTEGER, \"updated\" INTEGER, \"last_read\" INTEGER, \"title\" TEXT, \"authors\" TEXT, \"tags\" TEXT, \"links\" TEXT, \"summaryHtml\" TEXT, \"summaryMarkdown\" TEXT, \"summaryPlain\" TEXT, \"contentHtml\" TEXT, \"contentMarkdown\" TEXT, \"contentPlain\" TEXT);"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "article_view",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE VIEW article_view AS SELECT a.*, f.icon, f.site_link FROM article AS a INNER JOIN feed AS f ON f.url = a.feed_id"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "article_feed_id",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE INDEX article_feed_id ON article (feed_id)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "article_fts",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE VIRTUAL TABLE IF NOT EXISTS \"article_fts\" USING fts5(title, summaryPlain, contentPlain, content=article, tokenize=\"trigram\");"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "article_after_insert",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER article_after_insert AFTER INSERT ON article BEGIN INSERT INTO article_fts (\"rowid\", title, summaryPlain, contentPlain) VALUES (new.\"rowid\", new.title, new.summaryPlain, new.contentPlain);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "article_after_delete",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER article_after_delete AFTER DELETE ON article BEGIN INSERT INTO article_fts (article_fts, \"rowid\", title, summaryPlain, contentPlain) VALUES ('delete', old.\"rowid\", old.title, old.summaryPlain, old.contentPlain);END"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "article_after_update",
|
||||
"sql": [
|
||||
{
|
||||
"dialect": "sqlite",
|
||||
"sql": "CREATE TRIGGER article_after_update AFTER UPDATE ON article BEGIN INSERT INTO article_fts (article_fts, \"rowid\", title, summaryPlain, contentPlain) VALUES ('delete', old.\"rowid\", old.title, old.summaryPlain, old.contentPlain);INSERT INTO article_fts (\"rowid\", title, summaryPlain, contentPlain) VALUES (new.\"rowid\", new.title, new.summaryPlain, new.contentPlain);END"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,23 +1,3 @@
|
||||
/*
|
||||
* Copyright (c) 2024-2025 Fabian Freund.
|
||||
*
|
||||
* This file is part of WebLibre
|
||||
* (see https://weblibre.eu).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// dart format width=80
|
||||
import 'package:drift/internal/versioned_schema.dart' as i0;
|
||||
import 'package:drift/drift.dart' as i1;
|
||||
@@ -750,7 +730,7 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
bangTriggersAfterDeleteFts,
|
||||
bangTriggersAfterUpdateFts,
|
||||
];
|
||||
late final Shape6 bang = Shape6(
|
||||
late final Shape10 bang = Shape10(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'bang',
|
||||
withoutRowId: false,
|
||||
@@ -766,7 +746,7 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
_column_6,
|
||||
_column_7,
|
||||
_column_26,
|
||||
_column_27,
|
||||
_column_32,
|
||||
],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
@@ -798,18 +778,18 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
'CREATE TRIGGER bang_triggers_after_update AFTER UPDATE ON bang BEGIN DELETE FROM bang_triggers WHERE "trigger" = old."trigger" AND "group" = old."group";INSERT INTO bang_triggers ("trigger", "group", additional_trigger) SELECT new."trigger", new."group", json_each.value FROM json_each(new.additional_triggers)WHERE new.additional_triggers IS NOT NULL;END',
|
||||
'bang_triggers_after_update',
|
||||
);
|
||||
late final Shape1 bangSync = Shape1(
|
||||
late final Shape11 bangSync = Shape11(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'bang_sync',
|
||||
withoutRowId: false,
|
||||
isStrict: false,
|
||||
tableConstraints: [],
|
||||
columns: [_column_8, _column_9],
|
||||
columns: [_column_8, _column_33],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
);
|
||||
late final Shape2 bangFrequency = Shape2(
|
||||
late final Shape12 bangFrequency = Shape12(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'bang_frequency',
|
||||
withoutRowId: false,
|
||||
@@ -818,12 +798,12 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
'PRIMARY KEY("trigger", "group")',
|
||||
'FOREIGN KEY("trigger", "group")REFERENCES bang("trigger", "group")ON DELETE CASCADE',
|
||||
],
|
||||
columns: [_column_0, _column_1, _column_10, _column_11],
|
||||
columns: [_column_0, _column_1, _column_10, _column_34],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
);
|
||||
late final Shape3 bangHistory = Shape3(
|
||||
late final Shape13 bangHistory = Shape13(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'bang_history',
|
||||
withoutRowId: false,
|
||||
@@ -831,7 +811,7 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
tableConstraints: [
|
||||
'FOREIGN KEY("trigger", "group")REFERENCES bang("trigger", "group")ON DELETE CASCADE',
|
||||
],
|
||||
columns: [_column_12, _column_0, _column_1, _column_13],
|
||||
columns: [_column_12, _column_0, _column_1, _column_35],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
@@ -841,7 +821,7 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
entityName: 'bang_fts',
|
||||
moduleAndArgs:
|
||||
'fts5(trigger, website_name, content=bang, prefix=\'2 3\')',
|
||||
columns: [_column_14, _column_15],
|
||||
columns: [_column_36, _column_37],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
@@ -851,12 +831,12 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
entityName: 'bang_triggers_fts',
|
||||
moduleAndArgs:
|
||||
'fts5(additional_trigger, content=bang_triggers, prefix=\'2 3\')',
|
||||
columns: [_column_29],
|
||||
columns: [_column_38],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
);
|
||||
late final Shape9 bangDataView = Shape9(
|
||||
late final Shape14 bangDataView = Shape14(
|
||||
source: i0.VersionedView(
|
||||
entityName: 'bang_data_view',
|
||||
createViewStmt:
|
||||
@@ -871,9 +851,9 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
_column_22,
|
||||
_column_23,
|
||||
_column_30,
|
||||
_column_31,
|
||||
_column_39,
|
||||
_column_24,
|
||||
_column_25,
|
||||
_column_40,
|
||||
],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
@@ -905,6 +885,165 @@ final class Schema4 extends i0.VersionedSchema {
|
||||
);
|
||||
}
|
||||
|
||||
class Shape10 extends i0.VersionedTable {
|
||||
Shape10({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get trigger =>
|
||||
columnsByName['trigger']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get group =>
|
||||
columnsByName['group']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<String> get websiteName =>
|
||||
columnsByName['website_name']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get domain =>
|
||||
columnsByName['domain']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get urlTemplate =>
|
||||
columnsByName['url_template']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get category =>
|
||||
columnsByName['category']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get subCategory =>
|
||||
columnsByName['sub_category']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get format =>
|
||||
columnsByName['format']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get additionalTriggers =>
|
||||
columnsByName['additional_triggers']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get searxngApi =>
|
||||
columnsByName['searxng_api']! as i1.GeneratedColumn<int>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<int> _column_32(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'searxng_api',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||
defaultValue: const i1.CustomExpression('FALSE'),
|
||||
);
|
||||
|
||||
class Shape11 extends i0.VersionedTable {
|
||||
Shape11({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<int> get group =>
|
||||
columnsByName['group']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get lastSync =>
|
||||
columnsByName['last_sync']! as i1.GeneratedColumn<int>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<int> _column_33(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'last_sync',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
|
||||
class Shape12 extends i0.VersionedTable {
|
||||
Shape12({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get trigger =>
|
||||
columnsByName['trigger']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get group =>
|
||||
columnsByName['group']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get frequency =>
|
||||
columnsByName['frequency']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get lastUsed =>
|
||||
columnsByName['last_used']! as i1.GeneratedColumn<int>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<int> _column_34(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'last_used',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
|
||||
class Shape13 extends i0.VersionedTable {
|
||||
Shape13({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get searchQuery =>
|
||||
columnsByName['search_query']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get trigger =>
|
||||
columnsByName['trigger']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get group =>
|
||||
columnsByName['group']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get searchDate =>
|
||||
columnsByName['search_date']! as i1.GeneratedColumn<int>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<int> _column_35(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'search_date',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_36(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'trigger',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
$customConstraints: '',
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_37(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'website_name',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
$customConstraints: '',
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_38(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'additional_trigger',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
$customConstraints: '',
|
||||
);
|
||||
|
||||
class Shape14 extends i0.VersionedView {
|
||||
Shape14({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get trigger =>
|
||||
columnsByName['trigger']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get group =>
|
||||
columnsByName['group']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<String> get websiteName =>
|
||||
columnsByName['website_name']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get domain =>
|
||||
columnsByName['domain']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get urlTemplate =>
|
||||
columnsByName['url_template']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get category =>
|
||||
columnsByName['category']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get subCategory =>
|
||||
columnsByName['sub_category']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get format =>
|
||||
columnsByName['format']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get additionalTriggers =>
|
||||
columnsByName['additional_triggers']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get searxngApi =>
|
||||
columnsByName['searxng_api']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get frequency =>
|
||||
columnsByName['frequency']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get lastUsed =>
|
||||
columnsByName['last_used']! as i1.GeneratedColumn<int>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<int> _column_39(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'searxng_api',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
);
|
||||
i1.GeneratedColumn<int> _column_40(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'last_used',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.int,
|
||||
);
|
||||
i0.MigrationStepWithVersion migrationSteps({
|
||||
required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
|
||||
required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
|
||||
|
||||
@@ -1,23 +1,3 @@
|
||||
/*
|
||||
* Copyright (c) 2024-2025 Fabian Freund.
|
||||
*
|
||||
* This file is part of WebLibre
|
||||
* (see https://weblibre.eu).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// dart format width=80
|
||||
import 'package:drift/internal/versioned_schema.dart' as i0;
|
||||
import 'package:drift/drift.dart' as i1;
|
||||
@@ -121,8 +101,8 @@ class Shape1 extends i0.VersionedTable {
|
||||
columnsByName['origin']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<i2.Uint8List> get iconData =>
|
||||
columnsByName['icon_data']! as i1.GeneratedColumn<i2.Uint8List>;
|
||||
i1.GeneratedColumn<DateTime> get fetchDate =>
|
||||
columnsByName['fetch_date']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<int> get fetchDate =>
|
||||
columnsByName['fetch_date']! as i1.GeneratedColumn<int>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<String> _column_3(String aliasedName) =>
|
||||
@@ -141,12 +121,12 @@ i1.GeneratedColumn<i2.Uint8List> _column_4(String aliasedName) =>
|
||||
type: i1.DriftSqlType.blob,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_5(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
i1.GeneratedColumn<int> _column_5(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'fetch_date',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
|
||||
@@ -154,8 +134,8 @@ class Shape2 extends i0.VersionedTable {
|
||||
Shape2({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<int> get revision =>
|
||||
columnsByName['revision']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<DateTime> get completionDate =>
|
||||
columnsByName['completion_date']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<int> get completionDate =>
|
||||
columnsByName['completion_date']! as i1.GeneratedColumn<int>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<int> _column_6(String aliasedName) =>
|
||||
@@ -166,12 +146,12 @@ i1.GeneratedColumn<int> _column_6(String aliasedName) =>
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_7(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
i1.GeneratedColumn<int> _column_7(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'completion_date',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
|
||||
@@ -181,8 +161,8 @@ class Shape3 extends i0.VersionedTable {
|
||||
columnsByName['key']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get json =>
|
||||
columnsByName['json']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<DateTime> get expireAt =>
|
||||
columnsByName['expireAt']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<int> get expireAt =>
|
||||
columnsByName['expireAt']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<String> get destroyKey =>
|
||||
columnsByName['destroyKey']! as i1.GeneratedColumn<String>;
|
||||
}
|
||||
@@ -195,12 +175,12 @@ i1.GeneratedColumn<String> _column_8(String aliasedName) =>
|
||||
type: i1.DriftSqlType.string,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_9(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
i1.GeneratedColumn<int> _column_9(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'expireAt',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
type: i1.DriftSqlType.int,
|
||||
$customConstraints: '',
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_10(String aliasedName) =>
|
||||
|
||||
@@ -81,11 +81,11 @@ class Bang extends Table with TableInfo<Bang, BangData> {
|
||||
requiredDuringInsert: false,
|
||||
$customConstraints: '',
|
||||
);
|
||||
late final GeneratedColumn<bool> searxngApi = GeneratedColumn<bool>(
|
||||
late final GeneratedColumn<int> searxngApi = GeneratedColumn<int>(
|
||||
'searxng_api',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.bool,
|
||||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
$customConstraints: 'NOT NULL DEFAULT FALSE',
|
||||
defaultValue: const CustomExpression('FALSE'),
|
||||
@@ -151,7 +151,7 @@ class Bang extends Table with TableInfo<Bang, BangData> {
|
||||
data['${effectivePrefix}additional_triggers'],
|
||||
),
|
||||
searxngApi: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.bool,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}searxng_api'],
|
||||
)!,
|
||||
);
|
||||
@@ -180,7 +180,7 @@ class BangData extends DataClass implements Insertable<BangData> {
|
||||
final String? subCategory;
|
||||
final String? format;
|
||||
final String? additionalTriggers;
|
||||
final bool searxngApi;
|
||||
final int searxngApi;
|
||||
const BangData({
|
||||
required this.trigger,
|
||||
required this.group,
|
||||
@@ -213,7 +213,7 @@ class BangData extends DataClass implements Insertable<BangData> {
|
||||
if (!nullToAbsent || additionalTriggers != null) {
|
||||
map['additional_triggers'] = Variable<String>(additionalTriggers);
|
||||
}
|
||||
map['searxng_api'] = Variable<bool>(searxngApi);
|
||||
map['searxng_api'] = Variable<int>(searxngApi);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ class BangData extends DataClass implements Insertable<BangData> {
|
||||
additionalTriggers: serializer.fromJson<String?>(
|
||||
json['additionalTriggers'],
|
||||
),
|
||||
searxngApi: serializer.fromJson<bool>(json['searxngApi']),
|
||||
searxngApi: serializer.fromJson<int>(json['searxngApi']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
@@ -250,7 +250,7 @@ class BangData extends DataClass implements Insertable<BangData> {
|
||||
'subCategory': serializer.toJson<String?>(subCategory),
|
||||
'format': serializer.toJson<String?>(format),
|
||||
'additionalTriggers': serializer.toJson<String?>(additionalTriggers),
|
||||
'searxngApi': serializer.toJson<bool>(searxngApi),
|
||||
'searxngApi': serializer.toJson<int>(searxngApi),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ class BangData extends DataClass implements Insertable<BangData> {
|
||||
Value<String?> subCategory = const Value.absent(),
|
||||
Value<String?> format = const Value.absent(),
|
||||
Value<String?> additionalTriggers = const Value.absent(),
|
||||
bool? searxngApi,
|
||||
int? searxngApi,
|
||||
}) => BangData(
|
||||
trigger: trigger ?? this.trigger,
|
||||
group: group ?? this.group,
|
||||
@@ -360,7 +360,7 @@ class BangCompanion extends UpdateCompanion<BangData> {
|
||||
final Value<String?> subCategory;
|
||||
final Value<String?> format;
|
||||
final Value<String?> additionalTriggers;
|
||||
final Value<bool> searxngApi;
|
||||
final Value<int> searxngApi;
|
||||
final Value<int> rowid;
|
||||
const BangCompanion({
|
||||
this.trigger = const Value.absent(),
|
||||
@@ -402,7 +402,7 @@ class BangCompanion extends UpdateCompanion<BangData> {
|
||||
Expression<String>? subCategory,
|
||||
Expression<String>? format,
|
||||
Expression<String>? additionalTriggers,
|
||||
Expression<bool>? searxngApi,
|
||||
Expression<int>? searxngApi,
|
||||
Expression<int>? rowid,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
@@ -430,7 +430,7 @@ class BangCompanion extends UpdateCompanion<BangData> {
|
||||
Value<String?>? subCategory,
|
||||
Value<String?>? format,
|
||||
Value<String?>? additionalTriggers,
|
||||
Value<bool>? searxngApi,
|
||||
Value<int>? searxngApi,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return BangCompanion(
|
||||
@@ -479,7 +479,7 @@ class BangCompanion extends UpdateCompanion<BangData> {
|
||||
map['additional_triggers'] = Variable<String>(additionalTriggers.value);
|
||||
}
|
||||
if (searxngApi.present) {
|
||||
map['searxng_api'] = Variable<bool>(searxngApi.value);
|
||||
map['searxng_api'] = Variable<int>(searxngApi.value);
|
||||
}
|
||||
if (rowid.present) {
|
||||
map['rowid'] = Variable<int>(rowid.value);
|
||||
@@ -749,11 +749,11 @@ class BangSync extends Table with TableInfo<BangSync, BangSyncData> {
|
||||
requiredDuringInsert: false,
|
||||
$customConstraints: 'PRIMARY KEY NOT NULL',
|
||||
);
|
||||
late final GeneratedColumn<DateTime> lastSync = GeneratedColumn<DateTime>(
|
||||
late final GeneratedColumn<int> lastSync = GeneratedColumn<int>(
|
||||
'last_sync',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.dateTime,
|
||||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
@@ -775,7 +775,7 @@ class BangSync extends Table with TableInfo<BangSync, BangSyncData> {
|
||||
data['${effectivePrefix}group'],
|
||||
)!,
|
||||
lastSync: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}last_sync'],
|
||||
)!,
|
||||
);
|
||||
@@ -792,13 +792,13 @@ class BangSync extends Table with TableInfo<BangSync, BangSyncData> {
|
||||
|
||||
class BangSyncData extends DataClass implements Insertable<BangSyncData> {
|
||||
final int group;
|
||||
final DateTime lastSync;
|
||||
final int lastSync;
|
||||
const BangSyncData({required this.group, required this.lastSync});
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['group'] = Variable<int>(group);
|
||||
map['last_sync'] = Variable<DateTime>(lastSync);
|
||||
map['last_sync'] = Variable<int>(lastSync);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ class BangSyncData extends DataClass implements Insertable<BangSyncData> {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return BangSyncData(
|
||||
group: serializer.fromJson<int>(json['group']),
|
||||
lastSync: serializer.fromJson<DateTime>(json['lastSync']),
|
||||
lastSync: serializer.fromJson<int>(json['lastSync']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
@@ -817,11 +817,11 @@ class BangSyncData extends DataClass implements Insertable<BangSyncData> {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'group': serializer.toJson<int>(group),
|
||||
'lastSync': serializer.toJson<DateTime>(lastSync),
|
||||
'lastSync': serializer.toJson<int>(lastSync),
|
||||
};
|
||||
}
|
||||
|
||||
BangSyncData copyWith({int? group, DateTime? lastSync}) => BangSyncData(
|
||||
BangSyncData copyWith({int? group, int? lastSync}) => BangSyncData(
|
||||
group: group ?? this.group,
|
||||
lastSync: lastSync ?? this.lastSync,
|
||||
);
|
||||
@@ -853,18 +853,18 @@ class BangSyncData extends DataClass implements Insertable<BangSyncData> {
|
||||
|
||||
class BangSyncCompanion extends UpdateCompanion<BangSyncData> {
|
||||
final Value<int> group;
|
||||
final Value<DateTime> lastSync;
|
||||
final Value<int> lastSync;
|
||||
const BangSyncCompanion({
|
||||
this.group = const Value.absent(),
|
||||
this.lastSync = const Value.absent(),
|
||||
});
|
||||
BangSyncCompanion.insert({
|
||||
this.group = const Value.absent(),
|
||||
required DateTime lastSync,
|
||||
required int lastSync,
|
||||
}) : lastSync = Value(lastSync);
|
||||
static Insertable<BangSyncData> custom({
|
||||
Expression<int>? group,
|
||||
Expression<DateTime>? lastSync,
|
||||
Expression<int>? lastSync,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (group != null) 'group': group,
|
||||
@@ -872,7 +872,7 @@ class BangSyncCompanion extends UpdateCompanion<BangSyncData> {
|
||||
});
|
||||
}
|
||||
|
||||
BangSyncCompanion copyWith({Value<int>? group, Value<DateTime>? lastSync}) {
|
||||
BangSyncCompanion copyWith({Value<int>? group, Value<int>? lastSync}) {
|
||||
return BangSyncCompanion(
|
||||
group: group ?? this.group,
|
||||
lastSync: lastSync ?? this.lastSync,
|
||||
@@ -886,7 +886,7 @@ class BangSyncCompanion extends UpdateCompanion<BangSyncData> {
|
||||
map['group'] = Variable<int>(group.value);
|
||||
}
|
||||
if (lastSync.present) {
|
||||
map['last_sync'] = Variable<DateTime>(lastSync.value);
|
||||
map['last_sync'] = Variable<int>(lastSync.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@@ -931,11 +931,11 @@ class BangFrequency extends Table
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
late final GeneratedColumn<DateTime> lastUsed = GeneratedColumn<DateTime>(
|
||||
late final GeneratedColumn<int> lastUsed = GeneratedColumn<int>(
|
||||
'last_used',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.dateTime,
|
||||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
@@ -965,7 +965,7 @@ class BangFrequency extends Table
|
||||
data['${effectivePrefix}frequency'],
|
||||
)!,
|
||||
lastUsed: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}last_used'],
|
||||
)!,
|
||||
);
|
||||
@@ -990,7 +990,7 @@ class BangFrequencyData extends DataClass
|
||||
final String trigger;
|
||||
final int group;
|
||||
final int frequency;
|
||||
final DateTime lastUsed;
|
||||
final int lastUsed;
|
||||
const BangFrequencyData({
|
||||
required this.trigger,
|
||||
required this.group,
|
||||
@@ -1003,7 +1003,7 @@ class BangFrequencyData extends DataClass
|
||||
map['trigger'] = Variable<String>(trigger);
|
||||
map['group'] = Variable<int>(group);
|
||||
map['frequency'] = Variable<int>(frequency);
|
||||
map['last_used'] = Variable<DateTime>(lastUsed);
|
||||
map['last_used'] = Variable<int>(lastUsed);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -1016,7 +1016,7 @@ class BangFrequencyData extends DataClass
|
||||
trigger: serializer.fromJson<String>(json['trigger']),
|
||||
group: serializer.fromJson<int>(json['group']),
|
||||
frequency: serializer.fromJson<int>(json['frequency']),
|
||||
lastUsed: serializer.fromJson<DateTime>(json['lastUsed']),
|
||||
lastUsed: serializer.fromJson<int>(json['lastUsed']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
@@ -1026,7 +1026,7 @@ class BangFrequencyData extends DataClass
|
||||
'trigger': serializer.toJson<String>(trigger),
|
||||
'group': serializer.toJson<int>(group),
|
||||
'frequency': serializer.toJson<int>(frequency),
|
||||
'lastUsed': serializer.toJson<DateTime>(lastUsed),
|
||||
'lastUsed': serializer.toJson<int>(lastUsed),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1034,7 +1034,7 @@ class BangFrequencyData extends DataClass
|
||||
String? trigger,
|
||||
int? group,
|
||||
int? frequency,
|
||||
DateTime? lastUsed,
|
||||
int? lastUsed,
|
||||
}) => BangFrequencyData(
|
||||
trigger: trigger ?? this.trigger,
|
||||
group: group ?? this.group,
|
||||
@@ -1077,7 +1077,7 @@ class BangFrequencyCompanion extends UpdateCompanion<BangFrequencyData> {
|
||||
final Value<String> trigger;
|
||||
final Value<int> group;
|
||||
final Value<int> frequency;
|
||||
final Value<DateTime> lastUsed;
|
||||
final Value<int> lastUsed;
|
||||
final Value<int> rowid;
|
||||
const BangFrequencyCompanion({
|
||||
this.trigger = const Value.absent(),
|
||||
@@ -1090,7 +1090,7 @@ class BangFrequencyCompanion extends UpdateCompanion<BangFrequencyData> {
|
||||
required String trigger,
|
||||
required int group,
|
||||
required int frequency,
|
||||
required DateTime lastUsed,
|
||||
required int lastUsed,
|
||||
this.rowid = const Value.absent(),
|
||||
}) : trigger = Value(trigger),
|
||||
group = Value(group),
|
||||
@@ -1100,7 +1100,7 @@ class BangFrequencyCompanion extends UpdateCompanion<BangFrequencyData> {
|
||||
Expression<String>? trigger,
|
||||
Expression<int>? group,
|
||||
Expression<int>? frequency,
|
||||
Expression<DateTime>? lastUsed,
|
||||
Expression<int>? lastUsed,
|
||||
Expression<int>? rowid,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
@@ -1116,7 +1116,7 @@ class BangFrequencyCompanion extends UpdateCompanion<BangFrequencyData> {
|
||||
Value<String>? trigger,
|
||||
Value<int>? group,
|
||||
Value<int>? frequency,
|
||||
Value<DateTime>? lastUsed,
|
||||
Value<int>? lastUsed,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return BangFrequencyCompanion(
|
||||
@@ -1141,7 +1141,7 @@ class BangFrequencyCompanion extends UpdateCompanion<BangFrequencyData> {
|
||||
map['frequency'] = Variable<int>(frequency.value);
|
||||
}
|
||||
if (lastUsed.present) {
|
||||
map['last_used'] = Variable<DateTime>(lastUsed.value);
|
||||
map['last_used'] = Variable<int>(lastUsed.value);
|
||||
}
|
||||
if (rowid.present) {
|
||||
map['rowid'] = Variable<int>(rowid.value);
|
||||
@@ -1191,11 +1191,11 @@ class BangHistory extends Table with TableInfo<BangHistory, BangHistoryData> {
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
late final GeneratedColumn<DateTime> searchDate = GeneratedColumn<DateTime>(
|
||||
late final GeneratedColumn<int> searchDate = GeneratedColumn<int>(
|
||||
'search_date',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.dateTime,
|
||||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
@@ -1230,7 +1230,7 @@ class BangHistory extends Table with TableInfo<BangHistory, BangHistoryData> {
|
||||
data['${effectivePrefix}group'],
|
||||
)!,
|
||||
searchDate: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}search_date'],
|
||||
)!,
|
||||
);
|
||||
@@ -1253,7 +1253,7 @@ class BangHistoryData extends DataClass implements Insertable<BangHistoryData> {
|
||||
final String searchQuery;
|
||||
final String trigger;
|
||||
final int group;
|
||||
final DateTime searchDate;
|
||||
final int searchDate;
|
||||
const BangHistoryData({
|
||||
required this.searchQuery,
|
||||
required this.trigger,
|
||||
@@ -1266,7 +1266,7 @@ class BangHistoryData extends DataClass implements Insertable<BangHistoryData> {
|
||||
map['search_query'] = Variable<String>(searchQuery);
|
||||
map['trigger'] = Variable<String>(trigger);
|
||||
map['group'] = Variable<int>(group);
|
||||
map['search_date'] = Variable<DateTime>(searchDate);
|
||||
map['search_date'] = Variable<int>(searchDate);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -1279,7 +1279,7 @@ class BangHistoryData extends DataClass implements Insertable<BangHistoryData> {
|
||||
searchQuery: serializer.fromJson<String>(json['searchQuery']),
|
||||
trigger: serializer.fromJson<String>(json['trigger']),
|
||||
group: serializer.fromJson<int>(json['group']),
|
||||
searchDate: serializer.fromJson<DateTime>(json['searchDate']),
|
||||
searchDate: serializer.fromJson<int>(json['searchDate']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
@@ -1289,7 +1289,7 @@ class BangHistoryData extends DataClass implements Insertable<BangHistoryData> {
|
||||
'searchQuery': serializer.toJson<String>(searchQuery),
|
||||
'trigger': serializer.toJson<String>(trigger),
|
||||
'group': serializer.toJson<int>(group),
|
||||
'searchDate': serializer.toJson<DateTime>(searchDate),
|
||||
'searchDate': serializer.toJson<int>(searchDate),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1297,7 +1297,7 @@ class BangHistoryData extends DataClass implements Insertable<BangHistoryData> {
|
||||
String? searchQuery,
|
||||
String? trigger,
|
||||
int? group,
|
||||
DateTime? searchDate,
|
||||
int? searchDate,
|
||||
}) => BangHistoryData(
|
||||
searchQuery: searchQuery ?? this.searchQuery,
|
||||
trigger: trigger ?? this.trigger,
|
||||
@@ -1344,7 +1344,7 @@ class BangHistoryCompanion extends UpdateCompanion<BangHistoryData> {
|
||||
final Value<String> searchQuery;
|
||||
final Value<String> trigger;
|
||||
final Value<int> group;
|
||||
final Value<DateTime> searchDate;
|
||||
final Value<int> searchDate;
|
||||
final Value<int> rowid;
|
||||
const BangHistoryCompanion({
|
||||
this.searchQuery = const Value.absent(),
|
||||
@@ -1357,7 +1357,7 @@ class BangHistoryCompanion extends UpdateCompanion<BangHistoryData> {
|
||||
required String searchQuery,
|
||||
required String trigger,
|
||||
required int group,
|
||||
required DateTime searchDate,
|
||||
required int searchDate,
|
||||
this.rowid = const Value.absent(),
|
||||
}) : searchQuery = Value(searchQuery),
|
||||
trigger = Value(trigger),
|
||||
@@ -1367,7 +1367,7 @@ class BangHistoryCompanion extends UpdateCompanion<BangHistoryData> {
|
||||
Expression<String>? searchQuery,
|
||||
Expression<String>? trigger,
|
||||
Expression<int>? group,
|
||||
Expression<DateTime>? searchDate,
|
||||
Expression<int>? searchDate,
|
||||
Expression<int>? rowid,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
@@ -1383,7 +1383,7 @@ class BangHistoryCompanion extends UpdateCompanion<BangHistoryData> {
|
||||
Value<String>? searchQuery,
|
||||
Value<String>? trigger,
|
||||
Value<int>? group,
|
||||
Value<DateTime>? searchDate,
|
||||
Value<int>? searchDate,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return BangHistoryCompanion(
|
||||
@@ -1408,7 +1408,7 @@ class BangHistoryCompanion extends UpdateCompanion<BangHistoryData> {
|
||||
map['group'] = Variable<int>(group.value);
|
||||
}
|
||||
if (searchDate.present) {
|
||||
map['search_date'] = Variable<DateTime>(searchDate.value);
|
||||
map['search_date'] = Variable<int>(searchDate.value);
|
||||
}
|
||||
if (rowid.present) {
|
||||
map['rowid'] = Variable<int>(rowid.value);
|
||||
@@ -1440,17 +1440,17 @@ class BangFts extends Table
|
||||
late final GeneratedColumn<String> trigger = GeneratedColumn<String>(
|
||||
'trigger',
|
||||
aliasedName,
|
||||
false,
|
||||
true,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
requiredDuringInsert: false,
|
||||
$customConstraints: '',
|
||||
);
|
||||
late final GeneratedColumn<String> websiteName = GeneratedColumn<String>(
|
||||
'website_name',
|
||||
aliasedName,
|
||||
false,
|
||||
true,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
requiredDuringInsert: false,
|
||||
$customConstraints: '',
|
||||
);
|
||||
@override
|
||||
@@ -1469,11 +1469,11 @@ class BangFts extends Table
|
||||
trigger: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}trigger'],
|
||||
)!,
|
||||
),
|
||||
websiteName: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}website_name'],
|
||||
)!,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1482,20 +1482,26 @@ class BangFts extends Table
|
||||
return BangFts(attachedDatabase, alias);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get dontWriteConstraints => true;
|
||||
@override
|
||||
String get moduleAndArgs =>
|
||||
'fts5(trigger, website_name, content=bang, prefix=\'2 3\')';
|
||||
}
|
||||
|
||||
class BangFtsData extends DataClass implements Insertable<BangFtsData> {
|
||||
final String trigger;
|
||||
final String websiteName;
|
||||
const BangFtsData({required this.trigger, required this.websiteName});
|
||||
final String? trigger;
|
||||
final String? websiteName;
|
||||
const BangFtsData({this.trigger, this.websiteName});
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['trigger'] = Variable<String>(trigger);
|
||||
map['website_name'] = Variable<String>(websiteName);
|
||||
if (!nullToAbsent || trigger != null) {
|
||||
map['trigger'] = Variable<String>(trigger);
|
||||
}
|
||||
if (!nullToAbsent || websiteName != null) {
|
||||
map['website_name'] = Variable<String>(websiteName);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -1505,22 +1511,25 @@ class BangFtsData extends DataClass implements Insertable<BangFtsData> {
|
||||
}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return BangFtsData(
|
||||
trigger: serializer.fromJson<String>(json['trigger']),
|
||||
websiteName: serializer.fromJson<String>(json['websiteName']),
|
||||
trigger: serializer.fromJson<String?>(json['trigger']),
|
||||
websiteName: serializer.fromJson<String?>(json['websiteName']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'trigger': serializer.toJson<String>(trigger),
|
||||
'websiteName': serializer.toJson<String>(websiteName),
|
||||
'trigger': serializer.toJson<String?>(trigger),
|
||||
'websiteName': serializer.toJson<String?>(websiteName),
|
||||
};
|
||||
}
|
||||
|
||||
BangFtsData copyWith({String? trigger, String? websiteName}) => BangFtsData(
|
||||
trigger: trigger ?? this.trigger,
|
||||
websiteName: websiteName ?? this.websiteName,
|
||||
BangFtsData copyWith({
|
||||
Value<String?> trigger = const Value.absent(),
|
||||
Value<String?> websiteName = const Value.absent(),
|
||||
}) => BangFtsData(
|
||||
trigger: trigger.present ? trigger.value : this.trigger,
|
||||
websiteName: websiteName.present ? websiteName.value : this.websiteName,
|
||||
);
|
||||
BangFtsData copyWithCompanion(BangFtsCompanion data) {
|
||||
return BangFtsData(
|
||||
@@ -1551,8 +1560,8 @@ class BangFtsData extends DataClass implements Insertable<BangFtsData> {
|
||||
}
|
||||
|
||||
class BangFtsCompanion extends UpdateCompanion<BangFtsData> {
|
||||
final Value<String> trigger;
|
||||
final Value<String> websiteName;
|
||||
final Value<String?> trigger;
|
||||
final Value<String?> websiteName;
|
||||
final Value<int> rowid;
|
||||
const BangFtsCompanion({
|
||||
this.trigger = const Value.absent(),
|
||||
@@ -1560,11 +1569,10 @@ class BangFtsCompanion extends UpdateCompanion<BangFtsData> {
|
||||
this.rowid = const Value.absent(),
|
||||
});
|
||||
BangFtsCompanion.insert({
|
||||
required String trigger,
|
||||
required String websiteName,
|
||||
this.trigger = const Value.absent(),
|
||||
this.websiteName = const Value.absent(),
|
||||
this.rowid = const Value.absent(),
|
||||
}) : trigger = Value(trigger),
|
||||
websiteName = Value(websiteName);
|
||||
});
|
||||
static Insertable<BangFtsData> custom({
|
||||
Expression<String>? trigger,
|
||||
Expression<String>? websiteName,
|
||||
@@ -1578,8 +1586,8 @@ class BangFtsCompanion extends UpdateCompanion<BangFtsData> {
|
||||
}
|
||||
|
||||
BangFtsCompanion copyWith({
|
||||
Value<String>? trigger,
|
||||
Value<String>? websiteName,
|
||||
Value<String?>? trigger,
|
||||
Value<String?>? websiteName,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return BangFtsCompanion(
|
||||
@@ -1627,9 +1635,9 @@ class BangTriggersFts extends Table
|
||||
GeneratedColumn<String>(
|
||||
'additional_trigger',
|
||||
aliasedName,
|
||||
false,
|
||||
true,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
requiredDuringInsert: false,
|
||||
$customConstraints: '',
|
||||
);
|
||||
@override
|
||||
@@ -1648,7 +1656,7 @@ class BangTriggersFts extends Table
|
||||
additionalTrigger: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}additional_trigger'],
|
||||
)!,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1657,6 +1665,8 @@ class BangTriggersFts extends Table
|
||||
return BangTriggersFts(attachedDatabase, alias);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get dontWriteConstraints => true;
|
||||
@override
|
||||
String get moduleAndArgs =>
|
||||
'fts5(additional_trigger, content=bang_triggers, prefix=\'2 3\')';
|
||||
@@ -1664,12 +1674,14 @@ class BangTriggersFts extends Table
|
||||
|
||||
class BangTriggersFtsData extends DataClass
|
||||
implements Insertable<BangTriggersFtsData> {
|
||||
final String additionalTrigger;
|
||||
const BangTriggersFtsData({required this.additionalTrigger});
|
||||
final String? additionalTrigger;
|
||||
const BangTriggersFtsData({this.additionalTrigger});
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['additional_trigger'] = Variable<String>(additionalTrigger);
|
||||
if (!nullToAbsent || additionalTrigger != null) {
|
||||
map['additional_trigger'] = Variable<String>(additionalTrigger);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -1679,21 +1691,26 @@ class BangTriggersFtsData extends DataClass
|
||||
}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return BangTriggersFtsData(
|
||||
additionalTrigger: serializer.fromJson<String>(json['additionalTrigger']),
|
||||
additionalTrigger: serializer.fromJson<String?>(
|
||||
json['additionalTrigger'],
|
||||
),
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'additionalTrigger': serializer.toJson<String>(additionalTrigger),
|
||||
'additionalTrigger': serializer.toJson<String?>(additionalTrigger),
|
||||
};
|
||||
}
|
||||
|
||||
BangTriggersFtsData copyWith({String? additionalTrigger}) =>
|
||||
BangTriggersFtsData(
|
||||
additionalTrigger: additionalTrigger ?? this.additionalTrigger,
|
||||
);
|
||||
BangTriggersFtsData copyWith({
|
||||
Value<String?> additionalTrigger = const Value.absent(),
|
||||
}) => BangTriggersFtsData(
|
||||
additionalTrigger: additionalTrigger.present
|
||||
? additionalTrigger.value
|
||||
: this.additionalTrigger,
|
||||
);
|
||||
BangTriggersFtsData copyWithCompanion(BangTriggersFtsCompanion data) {
|
||||
return BangTriggersFtsData(
|
||||
additionalTrigger: data.additionalTrigger.present
|
||||
@@ -1720,16 +1737,16 @@ class BangTriggersFtsData extends DataClass
|
||||
}
|
||||
|
||||
class BangTriggersFtsCompanion extends UpdateCompanion<BangTriggersFtsData> {
|
||||
final Value<String> additionalTrigger;
|
||||
final Value<String?> additionalTrigger;
|
||||
final Value<int> rowid;
|
||||
const BangTriggersFtsCompanion({
|
||||
this.additionalTrigger = const Value.absent(),
|
||||
this.rowid = const Value.absent(),
|
||||
});
|
||||
BangTriggersFtsCompanion.insert({
|
||||
required String additionalTrigger,
|
||||
this.additionalTrigger = const Value.absent(),
|
||||
this.rowid = const Value.absent(),
|
||||
}) : additionalTrigger = Value(additionalTrigger);
|
||||
});
|
||||
static Insertable<BangTriggersFtsData> custom({
|
||||
Expression<String>? additionalTrigger,
|
||||
Expression<int>? rowid,
|
||||
@@ -1741,7 +1758,7 @@ class BangTriggersFtsCompanion extends UpdateCompanion<BangTriggersFtsData> {
|
||||
}
|
||||
|
||||
BangTriggersFtsCompanion copyWith({
|
||||
Value<String>? additionalTrigger,
|
||||
Value<String?>? additionalTrigger,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return BangTriggersFtsCompanion(
|
||||
@@ -1782,9 +1799,9 @@ class BangDataViewData extends DataClass {
|
||||
final String? subCategory;
|
||||
final String? format;
|
||||
final String? additionalTriggers;
|
||||
final bool searxngApi;
|
||||
final int searxngApi;
|
||||
final int? frequency;
|
||||
final DateTime? lastUsed;
|
||||
final int? lastUsed;
|
||||
const BangDataViewData({
|
||||
required this.trigger,
|
||||
required this.group,
|
||||
@@ -1816,9 +1833,9 @@ class BangDataViewData extends DataClass {
|
||||
additionalTriggers: serializer.fromJson<String?>(
|
||||
json['additionalTriggers'],
|
||||
),
|
||||
searxngApi: serializer.fromJson<bool>(json['searxngApi']),
|
||||
searxngApi: serializer.fromJson<int>(json['searxngApi']),
|
||||
frequency: serializer.fromJson<int?>(json['frequency']),
|
||||
lastUsed: serializer.fromJson<DateTime?>(json['lastUsed']),
|
||||
lastUsed: serializer.fromJson<int?>(json['lastUsed']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
@@ -1834,9 +1851,9 @@ class BangDataViewData extends DataClass {
|
||||
'subCategory': serializer.toJson<String?>(subCategory),
|
||||
'format': serializer.toJson<String?>(format),
|
||||
'additionalTriggers': serializer.toJson<String?>(additionalTriggers),
|
||||
'searxngApi': serializer.toJson<bool>(searxngApi),
|
||||
'searxngApi': serializer.toJson<int>(searxngApi),
|
||||
'frequency': serializer.toJson<int?>(frequency),
|
||||
'lastUsed': serializer.toJson<DateTime?>(lastUsed),
|
||||
'lastUsed': serializer.toJson<int?>(lastUsed),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1850,9 +1867,9 @@ class BangDataViewData extends DataClass {
|
||||
Value<String?> subCategory = const Value.absent(),
|
||||
Value<String?> format = const Value.absent(),
|
||||
Value<String?> additionalTriggers = const Value.absent(),
|
||||
bool? searxngApi,
|
||||
int? searxngApi,
|
||||
Value<int?> frequency = const Value.absent(),
|
||||
Value<DateTime?> lastUsed = const Value.absent(),
|
||||
Value<int?> lastUsed = const Value.absent(),
|
||||
}) => BangDataViewData(
|
||||
trigger: trigger ?? this.trigger,
|
||||
group: group ?? this.group,
|
||||
@@ -1949,7 +1966,7 @@ class BangDataView extends ViewInfo<BangDataView, BangDataViewData>
|
||||
@override
|
||||
Map<SqlDialect, String> get createViewStatements => {
|
||||
SqlDialect.sqlite:
|
||||
'CREATE VIEW bang_data_view AS SELECT b.*, bf.frequency, bf.last_used FROM bang AS b LEFT JOIN bang_frequency AS bf ON b."trigger" = bf."trigger" AND b."group" = bf."group";',
|
||||
'CREATE VIEW bang_data_view AS SELECT b.*, bf.frequency, bf.last_used FROM bang AS b LEFT JOIN bang_frequency AS bf ON b."trigger" = bf."trigger" AND b."group" = bf."group"',
|
||||
};
|
||||
@override
|
||||
BangDataView get asDslTable => this;
|
||||
@@ -1994,7 +2011,7 @@ class BangDataView extends ViewInfo<BangDataView, BangDataViewData>
|
||||
data['${effectivePrefix}additional_triggers'],
|
||||
),
|
||||
searxngApi: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.bool,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}searxng_api'],
|
||||
)!,
|
||||
frequency: attachedDatabase.typeMapping.read(
|
||||
@@ -2002,7 +2019,7 @@ class BangDataView extends ViewInfo<BangDataView, BangDataViewData>
|
||||
data['${effectivePrefix}frequency'],
|
||||
),
|
||||
lastUsed: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}last_used'],
|
||||
),
|
||||
);
|
||||
@@ -2063,14 +2080,11 @@ class BangDataView extends ViewInfo<BangDataView, BangDataViewData>
|
||||
true,
|
||||
type: DriftSqlType.string,
|
||||
);
|
||||
late final GeneratedColumn<bool> searxngApi = GeneratedColumn<bool>(
|
||||
late final GeneratedColumn<int> searxngApi = GeneratedColumn<int>(
|
||||
'searxng_api',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.bool,
|
||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
||||
'CHECK ("searxng_api" IN (0, 1))',
|
||||
),
|
||||
type: DriftSqlType.int,
|
||||
);
|
||||
late final GeneratedColumn<int> frequency = GeneratedColumn<int>(
|
||||
'frequency',
|
||||
@@ -2078,11 +2092,11 @@ class BangDataView extends ViewInfo<BangDataView, BangDataViewData>
|
||||
true,
|
||||
type: DriftSqlType.int,
|
||||
);
|
||||
late final GeneratedColumn<DateTime> lastUsed = GeneratedColumn<DateTime>(
|
||||
late final GeneratedColumn<int> lastUsed = GeneratedColumn<int>(
|
||||
'last_used',
|
||||
aliasedName,
|
||||
true,
|
||||
type: DriftSqlType.dateTime,
|
||||
type: DriftSqlType.int,
|
||||
);
|
||||
@override
|
||||
BangDataView createAlias(String alias) {
|
||||
@@ -2092,7 +2106,7 @@ class BangDataView extends ViewInfo<BangDataView, BangDataViewData>
|
||||
@override
|
||||
Query? get query => null;
|
||||
@override
|
||||
Set<String> get readTables => const {};
|
||||
Set<String> get readTables => const {'bang', 'bang_frequency'};
|
||||
}
|
||||
|
||||
class DatabaseAtV4 extends GeneratedDatabase {
|
||||
@@ -2171,56 +2185,80 @@ class DatabaseAtV4 extends GeneratedDatabase {
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
),
|
||||
result: [],
|
||||
result: [TableUpdate('bang_triggers', kind: UpdateKind.delete)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.insert,
|
||||
),
|
||||
result: [TableUpdate('bang_triggers', kind: UpdateKind.insert)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.update,
|
||||
),
|
||||
result: [
|
||||
TableUpdate('bang_triggers', kind: UpdateKind.delete),
|
||||
TableUpdate('bang_triggers', kind: UpdateKind.insert),
|
||||
],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
),
|
||||
result: [],
|
||||
result: [TableUpdate('bang_frequency', kind: UpdateKind.delete)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
),
|
||||
result: [],
|
||||
result: [TableUpdate('bang_history', kind: UpdateKind.delete)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.insert,
|
||||
),
|
||||
result: [TableUpdate('bang_fts', kind: UpdateKind.insert)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
),
|
||||
result: [],
|
||||
result: [TableUpdate('bang_fts', kind: UpdateKind.insert)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
limitUpdateKind: UpdateKind.update,
|
||||
),
|
||||
result: [],
|
||||
result: [TableUpdate('bang_fts', kind: UpdateKind.insert)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang_triggers',
|
||||
limitUpdateKind: UpdateKind.insert,
|
||||
),
|
||||
result: [TableUpdate('bang_triggers_fts', kind: UpdateKind.insert)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang_triggers',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
),
|
||||
result: [],
|
||||
result: [TableUpdate('bang_triggers_fts', kind: UpdateKind.insert)],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang_triggers',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
limitUpdateKind: UpdateKind.update,
|
||||
),
|
||||
result: [],
|
||||
),
|
||||
WritePropagation(
|
||||
on: TableUpdateQuery.onTableName(
|
||||
'bang_triggers',
|
||||
limitUpdateKind: UpdateKind.delete,
|
||||
),
|
||||
result: [],
|
||||
result: [TableUpdate('bang_triggers_fts', kind: UpdateKind.insert)],
|
||||
),
|
||||
]);
|
||||
@override
|
||||
|
||||
@@ -248,11 +248,11 @@ class IconCache extends Table with TableInfo<IconCache, IconCacheData> {
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
late final GeneratedColumn<DateTime> fetchDate = GeneratedColumn<DateTime>(
|
||||
late final GeneratedColumn<int> fetchDate = GeneratedColumn<int>(
|
||||
'fetch_date',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.dateTime,
|
||||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
@@ -278,7 +278,7 @@ class IconCache extends Table with TableInfo<IconCache, IconCacheData> {
|
||||
data['${effectivePrefix}icon_data'],
|
||||
)!,
|
||||
fetchDate: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}fetch_date'],
|
||||
)!,
|
||||
);
|
||||
@@ -296,7 +296,7 @@ class IconCache extends Table with TableInfo<IconCache, IconCacheData> {
|
||||
class IconCacheData extends DataClass implements Insertable<IconCacheData> {
|
||||
final String origin;
|
||||
final i2.Uint8List iconData;
|
||||
final DateTime fetchDate;
|
||||
final int fetchDate;
|
||||
const IconCacheData({
|
||||
required this.origin,
|
||||
required this.iconData,
|
||||
@@ -307,7 +307,7 @@ class IconCacheData extends DataClass implements Insertable<IconCacheData> {
|
||||
final map = <String, Expression>{};
|
||||
map['origin'] = Variable<String>(origin);
|
||||
map['icon_data'] = Variable<i2.Uint8List>(iconData);
|
||||
map['fetch_date'] = Variable<DateTime>(fetchDate);
|
||||
map['fetch_date'] = Variable<int>(fetchDate);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ class IconCacheData extends DataClass implements Insertable<IconCacheData> {
|
||||
return IconCacheData(
|
||||
origin: serializer.fromJson<String>(json['origin']),
|
||||
iconData: serializer.fromJson<i2.Uint8List>(json['iconData']),
|
||||
fetchDate: serializer.fromJson<DateTime>(json['fetchDate']),
|
||||
fetchDate: serializer.fromJson<int>(json['fetchDate']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
@@ -328,14 +328,14 @@ class IconCacheData extends DataClass implements Insertable<IconCacheData> {
|
||||
return <String, dynamic>{
|
||||
'origin': serializer.toJson<String>(origin),
|
||||
'iconData': serializer.toJson<i2.Uint8List>(iconData),
|
||||
'fetchDate': serializer.toJson<DateTime>(fetchDate),
|
||||
'fetchDate': serializer.toJson<int>(fetchDate),
|
||||
};
|
||||
}
|
||||
|
||||
IconCacheData copyWith({
|
||||
String? origin,
|
||||
i2.Uint8List? iconData,
|
||||
DateTime? fetchDate,
|
||||
int? fetchDate,
|
||||
}) => IconCacheData(
|
||||
origin: origin ?? this.origin,
|
||||
iconData: iconData ?? this.iconData,
|
||||
@@ -374,7 +374,7 @@ class IconCacheData extends DataClass implements Insertable<IconCacheData> {
|
||||
class IconCacheCompanion extends UpdateCompanion<IconCacheData> {
|
||||
final Value<String> origin;
|
||||
final Value<i2.Uint8List> iconData;
|
||||
final Value<DateTime> fetchDate;
|
||||
final Value<int> fetchDate;
|
||||
final Value<int> rowid;
|
||||
const IconCacheCompanion({
|
||||
this.origin = const Value.absent(),
|
||||
@@ -385,7 +385,7 @@ class IconCacheCompanion extends UpdateCompanion<IconCacheData> {
|
||||
IconCacheCompanion.insert({
|
||||
required String origin,
|
||||
required i2.Uint8List iconData,
|
||||
required DateTime fetchDate,
|
||||
required int fetchDate,
|
||||
this.rowid = const Value.absent(),
|
||||
}) : origin = Value(origin),
|
||||
iconData = Value(iconData),
|
||||
@@ -393,7 +393,7 @@ class IconCacheCompanion extends UpdateCompanion<IconCacheData> {
|
||||
static Insertable<IconCacheData> custom({
|
||||
Expression<String>? origin,
|
||||
Expression<i2.Uint8List>? iconData,
|
||||
Expression<DateTime>? fetchDate,
|
||||
Expression<int>? fetchDate,
|
||||
Expression<int>? rowid,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
@@ -407,7 +407,7 @@ class IconCacheCompanion extends UpdateCompanion<IconCacheData> {
|
||||
IconCacheCompanion copyWith({
|
||||
Value<String>? origin,
|
||||
Value<i2.Uint8List>? iconData,
|
||||
Value<DateTime>? fetchDate,
|
||||
Value<int>? fetchDate,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return IconCacheCompanion(
|
||||
@@ -428,7 +428,7 @@ class IconCacheCompanion extends UpdateCompanion<IconCacheData> {
|
||||
map['icon_data'] = Variable<i2.Uint8List>(iconData.value);
|
||||
}
|
||||
if (fetchDate.present) {
|
||||
map['fetch_date'] = Variable<DateTime>(fetchDate.value);
|
||||
map['fetch_date'] = Variable<int>(fetchDate.value);
|
||||
}
|
||||
if (rowid.present) {
|
||||
map['rowid'] = Variable<int>(rowid.value);
|
||||
@@ -461,15 +461,14 @@ class Onboarding extends Table with TableInfo<Onboarding, OnboardingData> {
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
late final GeneratedColumn<DateTime> completionDate =
|
||||
GeneratedColumn<DateTime>(
|
||||
'completion_date',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.dateTime,
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
late final GeneratedColumn<int> completionDate = GeneratedColumn<int>(
|
||||
'completion_date',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [revision, completionDate];
|
||||
@override
|
||||
@@ -488,7 +487,7 @@ class Onboarding extends Table with TableInfo<Onboarding, OnboardingData> {
|
||||
data['${effectivePrefix}revision'],
|
||||
)!,
|
||||
completionDate: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}completion_date'],
|
||||
)!,
|
||||
);
|
||||
@@ -505,13 +504,13 @@ class Onboarding extends Table with TableInfo<Onboarding, OnboardingData> {
|
||||
|
||||
class OnboardingData extends DataClass implements Insertable<OnboardingData> {
|
||||
final int revision;
|
||||
final DateTime completionDate;
|
||||
final int completionDate;
|
||||
const OnboardingData({required this.revision, required this.completionDate});
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['revision'] = Variable<int>(revision);
|
||||
map['completion_date'] = Variable<DateTime>(completionDate);
|
||||
map['completion_date'] = Variable<int>(completionDate);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -522,7 +521,7 @@ class OnboardingData extends DataClass implements Insertable<OnboardingData> {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return OnboardingData(
|
||||
revision: serializer.fromJson<int>(json['revision']),
|
||||
completionDate: serializer.fromJson<DateTime>(json['completionDate']),
|
||||
completionDate: serializer.fromJson<int>(json['completionDate']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
@@ -530,11 +529,11 @@ class OnboardingData extends DataClass implements Insertable<OnboardingData> {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'revision': serializer.toJson<int>(revision),
|
||||
'completionDate': serializer.toJson<DateTime>(completionDate),
|
||||
'completionDate': serializer.toJson<int>(completionDate),
|
||||
};
|
||||
}
|
||||
|
||||
OnboardingData copyWith({int? revision, DateTime? completionDate}) =>
|
||||
OnboardingData copyWith({int? revision, int? completionDate}) =>
|
||||
OnboardingData(
|
||||
revision: revision ?? this.revision,
|
||||
completionDate: completionDate ?? this.completionDate,
|
||||
@@ -569,7 +568,7 @@ class OnboardingData extends DataClass implements Insertable<OnboardingData> {
|
||||
|
||||
class OnboardingCompanion extends UpdateCompanion<OnboardingData> {
|
||||
final Value<int> revision;
|
||||
final Value<DateTime> completionDate;
|
||||
final Value<int> completionDate;
|
||||
final Value<int> rowid;
|
||||
const OnboardingCompanion({
|
||||
this.revision = const Value.absent(),
|
||||
@@ -578,13 +577,13 @@ class OnboardingCompanion extends UpdateCompanion<OnboardingData> {
|
||||
});
|
||||
OnboardingCompanion.insert({
|
||||
required int revision,
|
||||
required DateTime completionDate,
|
||||
required int completionDate,
|
||||
this.rowid = const Value.absent(),
|
||||
}) : revision = Value(revision),
|
||||
completionDate = Value(completionDate);
|
||||
static Insertable<OnboardingData> custom({
|
||||
Expression<int>? revision,
|
||||
Expression<DateTime>? completionDate,
|
||||
Expression<int>? completionDate,
|
||||
Expression<int>? rowid,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
@@ -596,7 +595,7 @@ class OnboardingCompanion extends UpdateCompanion<OnboardingData> {
|
||||
|
||||
OnboardingCompanion copyWith({
|
||||
Value<int>? revision,
|
||||
Value<DateTime>? completionDate,
|
||||
Value<int>? completionDate,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return OnboardingCompanion(
|
||||
@@ -613,7 +612,7 @@ class OnboardingCompanion extends UpdateCompanion<OnboardingData> {
|
||||
map['revision'] = Variable<int>(revision.value);
|
||||
}
|
||||
if (completionDate.present) {
|
||||
map['completion_date'] = Variable<DateTime>(completionDate.value);
|
||||
map['completion_date'] = Variable<int>(completionDate.value);
|
||||
}
|
||||
if (rowid.present) {
|
||||
map['rowid'] = Variable<int>(rowid.value);
|
||||
@@ -653,11 +652,11 @@ class Riverpod extends Table with TableInfo<Riverpod, RiverpodData> {
|
||||
requiredDuringInsert: true,
|
||||
$customConstraints: 'NOT NULL',
|
||||
);
|
||||
late final GeneratedColumn<DateTime> expireAt = GeneratedColumn<DateTime>(
|
||||
late final GeneratedColumn<int> expireAt = GeneratedColumn<int>(
|
||||
'expireAt',
|
||||
aliasedName,
|
||||
true,
|
||||
type: DriftSqlType.dateTime,
|
||||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
$customConstraints: '',
|
||||
);
|
||||
@@ -691,7 +690,7 @@ class Riverpod extends Table with TableInfo<Riverpod, RiverpodData> {
|
||||
data['${effectivePrefix}json'],
|
||||
)!,
|
||||
expireAt: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}expireAt'],
|
||||
),
|
||||
destroyKey: attachedDatabase.typeMapping.read(
|
||||
@@ -715,7 +714,7 @@ class Riverpod extends Table with TableInfo<Riverpod, RiverpodData> {
|
||||
class RiverpodData extends DataClass implements Insertable<RiverpodData> {
|
||||
final String key;
|
||||
final String json;
|
||||
final DateTime? expireAt;
|
||||
final int? expireAt;
|
||||
final String? destroyKey;
|
||||
const RiverpodData({
|
||||
required this.key,
|
||||
@@ -729,7 +728,7 @@ class RiverpodData extends DataClass implements Insertable<RiverpodData> {
|
||||
map['key'] = Variable<String>(key);
|
||||
map['json'] = Variable<String>(json);
|
||||
if (!nullToAbsent || expireAt != null) {
|
||||
map['expireAt'] = Variable<DateTime>(expireAt);
|
||||
map['expireAt'] = Variable<int>(expireAt);
|
||||
}
|
||||
if (!nullToAbsent || destroyKey != null) {
|
||||
map['destroyKey'] = Variable<String>(destroyKey);
|
||||
@@ -745,7 +744,7 @@ class RiverpodData extends DataClass implements Insertable<RiverpodData> {
|
||||
return RiverpodData(
|
||||
key: serializer.fromJson<String>(json['key']),
|
||||
json: serializer.fromJson<String>(json['json']),
|
||||
expireAt: serializer.fromJson<DateTime?>(json['expireAt']),
|
||||
expireAt: serializer.fromJson<int?>(json['expireAt']),
|
||||
destroyKey: serializer.fromJson<String?>(json['destroyKey']),
|
||||
);
|
||||
}
|
||||
@@ -755,7 +754,7 @@ class RiverpodData extends DataClass implements Insertable<RiverpodData> {
|
||||
return <String, dynamic>{
|
||||
'key': serializer.toJson<String>(key),
|
||||
'json': serializer.toJson<String>(json),
|
||||
'expireAt': serializer.toJson<DateTime?>(expireAt),
|
||||
'expireAt': serializer.toJson<int?>(expireAt),
|
||||
'destroyKey': serializer.toJson<String?>(destroyKey),
|
||||
};
|
||||
}
|
||||
@@ -763,7 +762,7 @@ class RiverpodData extends DataClass implements Insertable<RiverpodData> {
|
||||
RiverpodData copyWith({
|
||||
String? key,
|
||||
String? json,
|
||||
Value<DateTime?> expireAt = const Value.absent(),
|
||||
Value<int?> expireAt = const Value.absent(),
|
||||
Value<String?> destroyKey = const Value.absent(),
|
||||
}) => RiverpodData(
|
||||
key: key ?? this.key,
|
||||
@@ -808,7 +807,7 @@ class RiverpodData extends DataClass implements Insertable<RiverpodData> {
|
||||
class RiverpodCompanion extends UpdateCompanion<RiverpodData> {
|
||||
final Value<String> key;
|
||||
final Value<String> json;
|
||||
final Value<DateTime?> expireAt;
|
||||
final Value<int?> expireAt;
|
||||
final Value<String?> destroyKey;
|
||||
const RiverpodCompanion({
|
||||
this.key = const Value.absent(),
|
||||
@@ -826,7 +825,7 @@ class RiverpodCompanion extends UpdateCompanion<RiverpodData> {
|
||||
static Insertable<RiverpodData> custom({
|
||||
Expression<String>? key,
|
||||
Expression<String>? json,
|
||||
Expression<DateTime>? expireAt,
|
||||
Expression<int>? expireAt,
|
||||
Expression<String>? destroyKey,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
@@ -840,7 +839,7 @@ class RiverpodCompanion extends UpdateCompanion<RiverpodData> {
|
||||
RiverpodCompanion copyWith({
|
||||
Value<String>? key,
|
||||
Value<String>? json,
|
||||
Value<DateTime?>? expireAt,
|
||||
Value<int?>? expireAt,
|
||||
Value<String?>? destroyKey,
|
||||
}) {
|
||||
return RiverpodCompanion(
|
||||
@@ -861,7 +860,7 @@ class RiverpodCompanion extends UpdateCompanion<RiverpodData> {
|
||||
map['json'] = Variable<String>(json.value);
|
||||
}
|
||||
if (expireAt.present) {
|
||||
map['expireAt'] = Variable<DateTime>(expireAt.value);
|
||||
map['expireAt'] = Variable<int>(expireAt.value);
|
||||
}
|
||||
if (destroyKey.present) {
|
||||
map['destroyKey'] = Variable<String>(destroyKey.value);
|
||||
|
||||
Reference in new issue
Block a user