diff --git a/src/migrations/20260826_005622_init.json b/src/migrations/20260826_005622_init.json new file mode 100644 index 0000000..7176891 --- /dev/null +++ b/src/migrations/20260826_005622_init.json @@ -0,0 +1,7763 @@ +{ + "version": "6", + "dialect": "sqlite", + "tables": { + "users_roles": { + "name": "users_roles", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + "order" + ], + "isUnique": false + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + "parent_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users_sessions": { + "name": "users_sessions", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users": { + "name": "users", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "salt": { + "name": "salt", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "hash": { + "name": "hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + }, + "users_email_idx": { + "name": "users_email_idx", + "columns": [ + "email" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "media": { + "name": "media", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "filename": { + "name": "filename", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_url": { + "name": "sizes_thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_width": { + "name": "sizes_thumbnail_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_height": { + "name": "sizes_thumbnail_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_mime_type": { + "name": "sizes_thumbnail_mime_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_filesize": { + "name": "sizes_thumbnail_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_thumbnail_filename": { + "name": "sizes_thumbnail_filename", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_card_url": { + "name": "sizes_card_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_card_width": { + "name": "sizes_card_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_card_height": { + "name": "sizes_card_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_card_mime_type": { + "name": "sizes_card_mime_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_card_filesize": { + "name": "sizes_card_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_card_filename": { + "name": "sizes_card_filename", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_hero_url": { + "name": "sizes_hero_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_hero_width": { + "name": "sizes_hero_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_hero_height": { + "name": "sizes_hero_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_hero_mime_type": { + "name": "sizes_hero_mime_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_hero_filesize": { + "name": "sizes_hero_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sizes_hero_filename": { + "name": "sizes_hero_filename", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + "filename" + ], + "isUnique": true + }, + "media_sizes_thumbnail_sizes_thumbnail_filename_idx": { + "name": "media_sizes_thumbnail_sizes_thumbnail_filename_idx", + "columns": [ + "sizes_thumbnail_filename" + ], + "isUnique": false + }, + "media_sizes_card_sizes_card_filename_idx": { + "name": "media_sizes_card_sizes_card_filename_idx", + "columns": [ + "sizes_card_filename" + ], + "isUnique": false + }, + "media_sizes_hero_sizes_hero_filename_idx": { + "name": "media_sizes_hero_sizes_hero_filename_idx", + "columns": [ + "sizes_hero_filename" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "media_locales": { + "name": "media_locales", + "columns": { + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "media_locales_locale_parent_id_unique": { + "name": "media_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "media_locales_parent_id_fk": { + "name": "media_locales_parent_id_fk", + "tableFrom": "media_locales", + "tableTo": "media", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_hero_trust_badges": { + "name": "pages_blocks_hero_trust_badges", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_hero_trust_badges_order_idx": { + "name": "pages_blocks_hero_trust_badges_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_hero_trust_badges_parent_id_idx": { + "name": "pages_blocks_hero_trust_badges_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_hero_trust_badges_locale_idx": { + "name": "pages_blocks_hero_trust_badges_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_hero_trust_badges_parent_id_fk": { + "name": "pages_blocks_hero_trust_badges_parent_id_fk", + "tableFrom": "pages_blocks_hero_trust_badges", + "tableTo": "pages_blocks_hero", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_hero": { + "name": "pages_blocks_hero", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "cta_secondary_target_id": { + "name": "cta_secondary_target_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "background_image_id": { + "name": "background_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_hero_order_idx": { + "name": "pages_blocks_hero_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_hero_parent_id_idx": { + "name": "pages_blocks_hero_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_hero_path_idx": { + "name": "pages_blocks_hero_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + }, + "pages_blocks_hero_cta_secondary_target_idx": { + "name": "pages_blocks_hero_cta_secondary_target_idx", + "columns": [ + "cta_secondary_target_id" + ], + "isUnique": false + }, + "pages_blocks_hero_background_image_idx": { + "name": "pages_blocks_hero_background_image_idx", + "columns": [ + "background_image_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_hero_cta_secondary_target_id_pages_id_fk": { + "name": "pages_blocks_hero_cta_secondary_target_id_pages_id_fk", + "tableFrom": "pages_blocks_hero", + "tableTo": "pages", + "columnsFrom": [ + "cta_secondary_target_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_hero_background_image_id_media_id_fk": { + "name": "pages_blocks_hero_background_image_id_media_id_fk", + "tableFrom": "pages_blocks_hero", + "tableTo": "media", + "columnsFrom": [ + "background_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_hero_parent_id_fk": { + "name": "pages_blocks_hero_parent_id_fk", + "tableFrom": "pages_blocks_hero", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_hero_locales": { + "name": "pages_blocks_hero_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cta_phone": { + "name": "cta_phone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cta_phone_label": { + "name": "cta_phone_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cta_secondary_label": { + "name": "cta_secondary_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_hero_locales_locale_parent_id_unique": { + "name": "pages_blocks_hero_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_hero_locales_parent_id_fk": { + "name": "pages_blocks_hero_locales_parent_id_fk", + "tableFrom": "pages_blocks_hero_locales", + "tableTo": "pages_blocks_hero", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_problem_solution_items": { + "name": "pages_blocks_problem_solution_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "problem_title": { + "name": "problem_title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "problem_description": { + "name": "problem_description", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "solution_title": { + "name": "solution_title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "solution_description": { + "name": "solution_description", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_problem_solution_items_order_idx": { + "name": "pages_blocks_problem_solution_items_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_problem_solution_items_parent_id_idx": { + "name": "pages_blocks_problem_solution_items_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_problem_solution_items_locale_idx": { + "name": "pages_blocks_problem_solution_items_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_problem_solution_items_parent_id_fk": { + "name": "pages_blocks_problem_solution_items_parent_id_fk", + "tableFrom": "pages_blocks_problem_solution_items", + "tableTo": "pages_blocks_problem_solution", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_problem_solution": { + "name": "pages_blocks_problem_solution", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_problem_solution_order_idx": { + "name": "pages_blocks_problem_solution_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_problem_solution_parent_id_idx": { + "name": "pages_blocks_problem_solution_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_problem_solution_path_idx": { + "name": "pages_blocks_problem_solution_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_problem_solution_parent_id_fk": { + "name": "pages_blocks_problem_solution_parent_id_fk", + "tableFrom": "pages_blocks_problem_solution", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_problem_solution_locales": { + "name": "pages_blocks_problem_solution_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_problem_solution_locales_locale_parent_id_uniqu": { + "name": "pages_blocks_problem_solution_locales_locale_parent_id_uniqu", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_problem_solution_locales_parent_id_fk": { + "name": "pages_blocks_problem_solution_locales_parent_id_fk", + "tableFrom": "pages_blocks_problem_solution_locales", + "tableTo": "pages_blocks_problem_solution", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_process_steps_steps": { + "name": "pages_blocks_process_steps_steps", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "step_number": { + "name": "step_number", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_process_steps_steps_order_idx": { + "name": "pages_blocks_process_steps_steps_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_process_steps_steps_parent_id_idx": { + "name": "pages_blocks_process_steps_steps_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_process_steps_steps_locale_idx": { + "name": "pages_blocks_process_steps_steps_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_process_steps_steps_parent_id_fk": { + "name": "pages_blocks_process_steps_steps_parent_id_fk", + "tableFrom": "pages_blocks_process_steps_steps", + "tableTo": "pages_blocks_process_steps", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_process_steps": { + "name": "pages_blocks_process_steps", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_process_steps_order_idx": { + "name": "pages_blocks_process_steps_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_process_steps_parent_id_idx": { + "name": "pages_blocks_process_steps_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_process_steps_path_idx": { + "name": "pages_blocks_process_steps_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_process_steps_parent_id_fk": { + "name": "pages_blocks_process_steps_parent_id_fk", + "tableFrom": "pages_blocks_process_steps", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_process_steps_locales": { + "name": "pages_blocks_process_steps_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_process_steps_locales_locale_parent_id_unique": { + "name": "pages_blocks_process_steps_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_process_steps_locales_parent_id_fk": { + "name": "pages_blocks_process_steps_locales_parent_id_fk", + "tableFrom": "pages_blocks_process_steps_locales", + "tableTo": "pages_blocks_process_steps", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_before_after_gallery_items": { + "name": "pages_blocks_before_after_gallery_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "category": { + "name": "category", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "before_image_id": { + "name": "before_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "after_image_id": { + "name": "after_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_before_after_gallery_items_order_idx": { + "name": "pages_blocks_before_after_gallery_items_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_before_after_gallery_items_parent_id_idx": { + "name": "pages_blocks_before_after_gallery_items_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_before_after_gallery_items_locale_idx": { + "name": "pages_blocks_before_after_gallery_items_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + }, + "pages_blocks_before_after_gallery_items_before_image_idx": { + "name": "pages_blocks_before_after_gallery_items_before_image_idx", + "columns": [ + "before_image_id" + ], + "isUnique": false + }, + "pages_blocks_before_after_gallery_items_after_image_idx": { + "name": "pages_blocks_before_after_gallery_items_after_image_idx", + "columns": [ + "after_image_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_before_after_gallery_items_before_image_id_media_id_fk": { + "name": "pages_blocks_before_after_gallery_items_before_image_id_media_id_fk", + "tableFrom": "pages_blocks_before_after_gallery_items", + "tableTo": "media", + "columnsFrom": [ + "before_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_before_after_gallery_items_after_image_id_media_id_fk": { + "name": "pages_blocks_before_after_gallery_items_after_image_id_media_id_fk", + "tableFrom": "pages_blocks_before_after_gallery_items", + "tableTo": "media", + "columnsFrom": [ + "after_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_before_after_gallery_items_parent_id_fk": { + "name": "pages_blocks_before_after_gallery_items_parent_id_fk", + "tableFrom": "pages_blocks_before_after_gallery_items", + "tableTo": "pages_blocks_before_after_gallery", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_before_after_gallery": { + "name": "pages_blocks_before_after_gallery", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_before_after_gallery_order_idx": { + "name": "pages_blocks_before_after_gallery_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_before_after_gallery_parent_id_idx": { + "name": "pages_blocks_before_after_gallery_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_before_after_gallery_path_idx": { + "name": "pages_blocks_before_after_gallery_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_before_after_gallery_parent_id_fk": { + "name": "pages_blocks_before_after_gallery_parent_id_fk", + "tableFrom": "pages_blocks_before_after_gallery", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_before_after_gallery_locales": { + "name": "pages_blocks_before_after_gallery_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_before_after_gallery_locales_locale_parent_id_u": { + "name": "pages_blocks_before_after_gallery_locales_locale_parent_id_u", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_before_after_gallery_locales_parent_id_fk": { + "name": "pages_blocks_before_after_gallery_locales_parent_id_fk", + "tableFrom": "pages_blocks_before_after_gallery_locales", + "tableTo": "pages_blocks_before_after_gallery", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_pricing_table_packages_features": { + "name": "pages_blocks_pricing_table_packages_features", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "feature": { + "name": "feature", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_pricing_table_packages_features_order_idx": { + "name": "pages_blocks_pricing_table_packages_features_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_pricing_table_packages_features_parent_id_idx": { + "name": "pages_blocks_pricing_table_packages_features_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_pricing_table_packages_features_locale_idx": { + "name": "pages_blocks_pricing_table_packages_features_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_pricing_table_packages_features_parent_id_fk": { + "name": "pages_blocks_pricing_table_packages_features_parent_id_fk", + "tableFrom": "pages_blocks_pricing_table_packages_features", + "tableTo": "pages_blocks_pricing_table_packages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_pricing_table_packages": { + "name": "pages_blocks_pricing_table_packages", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "price": { + "name": "price", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_popular": { + "name": "is_popular", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "cta_label": { + "name": "cta_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Zamów wycenę'" + } + }, + "indexes": { + "pages_blocks_pricing_table_packages_order_idx": { + "name": "pages_blocks_pricing_table_packages_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_pricing_table_packages_parent_id_idx": { + "name": "pages_blocks_pricing_table_packages_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_pricing_table_packages_locale_idx": { + "name": "pages_blocks_pricing_table_packages_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_pricing_table_packages_parent_id_fk": { + "name": "pages_blocks_pricing_table_packages_parent_id_fk", + "tableFrom": "pages_blocks_pricing_table_packages", + "tableTo": "pages_blocks_pricing_table", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_pricing_table": { + "name": "pages_blocks_pricing_table", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_pricing_table_order_idx": { + "name": "pages_blocks_pricing_table_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_pricing_table_parent_id_idx": { + "name": "pages_blocks_pricing_table_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_pricing_table_path_idx": { + "name": "pages_blocks_pricing_table_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_pricing_table_parent_id_fk": { + "name": "pages_blocks_pricing_table_parent_id_fk", + "tableFrom": "pages_blocks_pricing_table", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_pricing_table_locales": { + "name": "pages_blocks_pricing_table_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "disclaimer": { + "name": "disclaimer", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_pricing_table_locales_locale_parent_id_unique": { + "name": "pages_blocks_pricing_table_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_pricing_table_locales_parent_id_fk": { + "name": "pages_blocks_pricing_table_locales_parent_id_fk", + "tableFrom": "pages_blocks_pricing_table_locales", + "tableTo": "pages_blocks_pricing_table", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_tech_equipment_items": { + "name": "pages_blocks_tech_equipment_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_tech_equipment_items_order_idx": { + "name": "pages_blocks_tech_equipment_items_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_tech_equipment_items_parent_id_idx": { + "name": "pages_blocks_tech_equipment_items_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_tech_equipment_items_locale_idx": { + "name": "pages_blocks_tech_equipment_items_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + }, + "pages_blocks_tech_equipment_items_image_idx": { + "name": "pages_blocks_tech_equipment_items_image_idx", + "columns": [ + "image_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_tech_equipment_items_image_id_media_id_fk": { + "name": "pages_blocks_tech_equipment_items_image_id_media_id_fk", + "tableFrom": "pages_blocks_tech_equipment_items", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_tech_equipment_items_parent_id_fk": { + "name": "pages_blocks_tech_equipment_items_parent_id_fk", + "tableFrom": "pages_blocks_tech_equipment_items", + "tableTo": "pages_blocks_tech_equipment", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_tech_equipment": { + "name": "pages_blocks_tech_equipment", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_tech_equipment_order_idx": { + "name": "pages_blocks_tech_equipment_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_tech_equipment_parent_id_idx": { + "name": "pages_blocks_tech_equipment_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_tech_equipment_path_idx": { + "name": "pages_blocks_tech_equipment_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_tech_equipment_parent_id_fk": { + "name": "pages_blocks_tech_equipment_parent_id_fk", + "tableFrom": "pages_blocks_tech_equipment", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_tech_equipment_locales": { + "name": "pages_blocks_tech_equipment_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_tech_equipment_locales_locale_parent_id_unique": { + "name": "pages_blocks_tech_equipment_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_tech_equipment_locales_parent_id_fk": { + "name": "pages_blocks_tech_equipment_locales_parent_id_fk", + "tableFrom": "pages_blocks_tech_equipment_locales", + "tableTo": "pages_blocks_tech_equipment", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_faq_accordion_items": { + "name": "pages_blocks_faq_accordion_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "question": { + "name": "question", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "answer": { + "name": "answer", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_faq_accordion_items_order_idx": { + "name": "pages_blocks_faq_accordion_items_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_faq_accordion_items_parent_id_idx": { + "name": "pages_blocks_faq_accordion_items_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_faq_accordion_items_locale_idx": { + "name": "pages_blocks_faq_accordion_items_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_faq_accordion_items_parent_id_fk": { + "name": "pages_blocks_faq_accordion_items_parent_id_fk", + "tableFrom": "pages_blocks_faq_accordion_items", + "tableTo": "pages_blocks_faq_accordion", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_faq_accordion": { + "name": "pages_blocks_faq_accordion", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_faq_accordion_order_idx": { + "name": "pages_blocks_faq_accordion_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_faq_accordion_parent_id_idx": { + "name": "pages_blocks_faq_accordion_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_faq_accordion_path_idx": { + "name": "pages_blocks_faq_accordion_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_faq_accordion_parent_id_fk": { + "name": "pages_blocks_faq_accordion_parent_id_fk", + "tableFrom": "pages_blocks_faq_accordion", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_faq_accordion_locales": { + "name": "pages_blocks_faq_accordion_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_faq_accordion_locales_locale_parent_id_unique": { + "name": "pages_blocks_faq_accordion_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_faq_accordion_locales_parent_id_fk": { + "name": "pages_blocks_faq_accordion_locales_parent_id_fk", + "tableFrom": "pages_blocks_faq_accordion_locales", + "tableTo": "pages_blocks_faq_accordion", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_reviews_items": { + "name": "pages_blocks_reviews_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "author": { + "name": "author", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rating": { + "name": "rating", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 5 + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_reviews_items_order_idx": { + "name": "pages_blocks_reviews_items_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_reviews_items_parent_id_idx": { + "name": "pages_blocks_reviews_items_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_reviews_items_locale_idx": { + "name": "pages_blocks_reviews_items_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_reviews_items_parent_id_fk": { + "name": "pages_blocks_reviews_items_parent_id_fk", + "tableFrom": "pages_blocks_reviews_items", + "tableTo": "pages_blocks_reviews", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_reviews": { + "name": "pages_blocks_reviews", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_reviews_order_idx": { + "name": "pages_blocks_reviews_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_reviews_parent_id_idx": { + "name": "pages_blocks_reviews_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_reviews_path_idx": { + "name": "pages_blocks_reviews_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_reviews_parent_id_fk": { + "name": "pages_blocks_reviews_parent_id_fk", + "tableFrom": "pages_blocks_reviews", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_reviews_locales": { + "name": "pages_blocks_reviews_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_reviews_locales_locale_parent_id_unique": { + "name": "pages_blocks_reviews_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_reviews_locales_parent_id_fk": { + "name": "pages_blocks_reviews_locales_parent_id_fk", + "tableFrom": "pages_blocks_reviews_locales", + "tableTo": "pages_blocks_reviews", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_form_block": { + "name": "pages_blocks_form_block", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_form_block_order_idx": { + "name": "pages_blocks_form_block_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_form_block_parent_id_idx": { + "name": "pages_blocks_form_block_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_form_block_path_idx": { + "name": "pages_blocks_form_block_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_form_block_parent_id_fk": { + "name": "pages_blocks_form_block_parent_id_fk", + "tableFrom": "pages_blocks_form_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_form_block_locales": { + "name": "pages_blocks_form_block_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "phone": { + "name": "phone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "working_hours": { + "name": "working_hours", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "submit_button_text": { + "name": "submit_button_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Wyślij zapytanie o bezpłatną wycenę'" + }, + "consent_text": { + "name": "consent_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Wyrażam zgodę na przetwarzanie moich danych osobowych w celu kontaktu i przygotowania oferty zgodnie z Polityką Prywatności.'" + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_form_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_form_block_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_form_block_locales_parent_id_fk": { + "name": "pages_blocks_form_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_form_block_locales", + "tableTo": "pages_blocks_form_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_content": { + "name": "pages_blocks_content", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_content_order_idx": { + "name": "pages_blocks_content_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_content_parent_id_idx": { + "name": "pages_blocks_content_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_content_path_idx": { + "name": "pages_blocks_content_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_content_parent_id_fk": { + "name": "pages_blocks_content_parent_id_fk", + "tableFrom": "pages_blocks_content", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_content_locales": { + "name": "pages_blocks_content_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_content_locales_locale_parent_id_unique": { + "name": "pages_blocks_content_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_content_locales_parent_id_fk": { + "name": "pages_blocks_content_locales_parent_id_fk", + "tableFrom": "pages_blocks_content_locales", + "tableTo": "pages_blocks_content", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_blog_list_articles": { + "name": "pages_blocks_blog_list_articles", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "category": { + "name": "category", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "read_time": { + "name": "read_time", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'4 min czytania'" + }, + "date": { + "name": "date", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'2026'" + }, + "excerpt": { + "name": "excerpt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_blog_list_articles_order_idx": { + "name": "pages_blocks_blog_list_articles_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_blog_list_articles_parent_id_idx": { + "name": "pages_blocks_blog_list_articles_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_blog_list_articles_locale_idx": { + "name": "pages_blocks_blog_list_articles_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_blog_list_articles_parent_id_fk": { + "name": "pages_blocks_blog_list_articles_parent_id_fk", + "tableFrom": "pages_blocks_blog_list_articles", + "tableTo": "pages_blocks_blog_list", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_blog_list": { + "name": "pages_blocks_blog_list", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_blog_list_order_idx": { + "name": "pages_blocks_blog_list_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "pages_blocks_blog_list_parent_id_idx": { + "name": "pages_blocks_blog_list_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "pages_blocks_blog_list_path_idx": { + "name": "pages_blocks_blog_list_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "pages_blocks_blog_list_parent_id_fk": { + "name": "pages_blocks_blog_list_parent_id_fk", + "tableFrom": "pages_blocks_blog_list", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_blocks_blog_list_locales": { + "name": "pages_blocks_blog_list_locales", + "columns": { + "badge": { + "name": "badge", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Baza Wiedzy & Porady'" + }, + "heading": { + "name": "heading", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'Poradnik czyszczenia i pielęgnacji kostki brukowej'" + }, + "subheading": { + "name": "subheading", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Praktyczne wskazówki ekspertów: jak usuwać trudne plamy, kiedy impregnować nawierzchnię i dlaczego temperatura wody decyduje o skuteczności czyszczenia.'" + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_blocks_blog_list_locales_locale_parent_id_unique": { + "name": "pages_blocks_blog_list_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_blocks_blog_list_locales_parent_id_fk": { + "name": "pages_blocks_blog_list_locales_parent_id_fk", + "tableFrom": "pages_blocks_blog_list_locales", + "tableTo": "pages_blocks_blog_list", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages": { + "name": "pages", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "pages_updated_at_idx": { + "name": "pages_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "pages_created_at_idx": { + "name": "pages_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "pages_locales": { + "name": "pages_locales", + "columns": { + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "meta_title": { + "name": "meta_title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "meta_description": { + "name": "meta_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "meta_image_id": { + "name": "meta_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "meta_title_override": { + "name": "meta_title_override", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "pages_slug_idx": { + "name": "pages_slug_idx", + "columns": [ + "slug", + "_locale" + ], + "isUnique": false + }, + "pages_meta_meta_image_idx": { + "name": "pages_meta_meta_image_idx", + "columns": [ + "meta_image_id", + "_locale" + ], + "isUnique": false + }, + "pages_locales_locale_parent_id_unique": { + "name": "pages_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "pages_locales_meta_image_id_media_id_fk": { + "name": "pages_locales_meta_image_id_media_id_fk", + "tableFrom": "pages_locales", + "tableTo": "media", + "columnsFrom": [ + "meta_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_locales_parent_id_fk": { + "name": "pages_locales_parent_id_fk", + "tableFrom": "pages_locales", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_checkbox": { + "name": "forms_blocks_checkbox", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_checkbox_order_idx": { + "name": "forms_blocks_checkbox_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_checkbox_parent_id_idx": { + "name": "forms_blocks_checkbox_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_checkbox_path_idx": { + "name": "forms_blocks_checkbox_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_checkbox_parent_id_fk": { + "name": "forms_blocks_checkbox_parent_id_fk", + "tableFrom": "forms_blocks_checkbox", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_checkbox_locales": { + "name": "forms_blocks_checkbox_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_checkbox_locales_locale_parent_id_unique": { + "name": "forms_blocks_checkbox_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_checkbox_locales_parent_id_fk": { + "name": "forms_blocks_checkbox_locales_parent_id_fk", + "tableFrom": "forms_blocks_checkbox_locales", + "tableTo": "forms_blocks_checkbox", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_country": { + "name": "forms_blocks_country", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_country_order_idx": { + "name": "forms_blocks_country_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_country_parent_id_idx": { + "name": "forms_blocks_country_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_country_path_idx": { + "name": "forms_blocks_country_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_country_parent_id_fk": { + "name": "forms_blocks_country_parent_id_fk", + "tableFrom": "forms_blocks_country", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_country_locales": { + "name": "forms_blocks_country_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_country_locales_locale_parent_id_unique": { + "name": "forms_blocks_country_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_country_locales_parent_id_fk": { + "name": "forms_blocks_country_locales_parent_id_fk", + "tableFrom": "forms_blocks_country_locales", + "tableTo": "forms_blocks_country", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_email": { + "name": "forms_blocks_email", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_email_order_idx": { + "name": "forms_blocks_email_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_email_parent_id_idx": { + "name": "forms_blocks_email_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_email_path_idx": { + "name": "forms_blocks_email_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_email_parent_id_fk": { + "name": "forms_blocks_email_parent_id_fk", + "tableFrom": "forms_blocks_email", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_email_locales": { + "name": "forms_blocks_email_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_email_locales_locale_parent_id_unique": { + "name": "forms_blocks_email_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_email_locales_parent_id_fk": { + "name": "forms_blocks_email_locales_parent_id_fk", + "tableFrom": "forms_blocks_email_locales", + "tableTo": "forms_blocks_email", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_message": { + "name": "forms_blocks_message", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_message_order_idx": { + "name": "forms_blocks_message_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_message_parent_id_idx": { + "name": "forms_blocks_message_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_message_path_idx": { + "name": "forms_blocks_message_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_message_parent_id_fk": { + "name": "forms_blocks_message_parent_id_fk", + "tableFrom": "forms_blocks_message", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_message_locales": { + "name": "forms_blocks_message_locales", + "columns": { + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_message_locales_locale_parent_id_unique": { + "name": "forms_blocks_message_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_message_locales_parent_id_fk": { + "name": "forms_blocks_message_locales_parent_id_fk", + "tableFrom": "forms_blocks_message_locales", + "tableTo": "forms_blocks_message", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_number": { + "name": "forms_blocks_number", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_number_order_idx": { + "name": "forms_blocks_number_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_number_parent_id_idx": { + "name": "forms_blocks_number_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_number_path_idx": { + "name": "forms_blocks_number_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_number_parent_id_fk": { + "name": "forms_blocks_number_parent_id_fk", + "tableFrom": "forms_blocks_number", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_number_locales": { + "name": "forms_blocks_number_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_number_locales_locale_parent_id_unique": { + "name": "forms_blocks_number_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_number_locales_parent_id_fk": { + "name": "forms_blocks_number_locales_parent_id_fk", + "tableFrom": "forms_blocks_number_locales", + "tableTo": "forms_blocks_number", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_select_options": { + "name": "forms_blocks_select_options", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_select_options_order_idx": { + "name": "forms_blocks_select_options_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_select_options_parent_id_idx": { + "name": "forms_blocks_select_options_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_select_options_parent_id_fk": { + "name": "forms_blocks_select_options_parent_id_fk", + "tableFrom": "forms_blocks_select_options", + "tableTo": "forms_blocks_select", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_select_options_locales": { + "name": "forms_blocks_select_options_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_select_options_locales_locale_parent_id_unique": { + "name": "forms_blocks_select_options_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_select_options_locales_parent_id_fk": { + "name": "forms_blocks_select_options_locales_parent_id_fk", + "tableFrom": "forms_blocks_select_options_locales", + "tableTo": "forms_blocks_select_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_select": { + "name": "forms_blocks_select", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "placeholder": { + "name": "placeholder", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_select_order_idx": { + "name": "forms_blocks_select_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_select_parent_id_idx": { + "name": "forms_blocks_select_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_select_path_idx": { + "name": "forms_blocks_select_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_select_parent_id_fk": { + "name": "forms_blocks_select_parent_id_fk", + "tableFrom": "forms_blocks_select", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_select_locales": { + "name": "forms_blocks_select_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_select_locales_locale_parent_id_unique": { + "name": "forms_blocks_select_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_select_locales_parent_id_fk": { + "name": "forms_blocks_select_locales_parent_id_fk", + "tableFrom": "forms_blocks_select_locales", + "tableTo": "forms_blocks_select", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_state": { + "name": "forms_blocks_state", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_state_order_idx": { + "name": "forms_blocks_state_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_state_parent_id_idx": { + "name": "forms_blocks_state_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_state_path_idx": { + "name": "forms_blocks_state_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_state_parent_id_fk": { + "name": "forms_blocks_state_parent_id_fk", + "tableFrom": "forms_blocks_state", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_state_locales": { + "name": "forms_blocks_state_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_state_locales_locale_parent_id_unique": { + "name": "forms_blocks_state_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_state_locales_parent_id_fk": { + "name": "forms_blocks_state_locales_parent_id_fk", + "tableFrom": "forms_blocks_state_locales", + "tableTo": "forms_blocks_state", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_text": { + "name": "forms_blocks_text", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_text_order_idx": { + "name": "forms_blocks_text_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_text_parent_id_idx": { + "name": "forms_blocks_text_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_text_path_idx": { + "name": "forms_blocks_text_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_text_parent_id_fk": { + "name": "forms_blocks_text_parent_id_fk", + "tableFrom": "forms_blocks_text", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_text_locales": { + "name": "forms_blocks_text_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_text_locales_locale_parent_id_unique": { + "name": "forms_blocks_text_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_text_locales_parent_id_fk": { + "name": "forms_blocks_text_locales_parent_id_fk", + "tableFrom": "forms_blocks_text_locales", + "tableTo": "forms_blocks_text", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_textarea": { + "name": "forms_blocks_textarea", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "required": { + "name": "required", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "block_name": { + "name": "block_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_textarea_order_idx": { + "name": "forms_blocks_textarea_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_blocks_textarea_parent_id_idx": { + "name": "forms_blocks_textarea_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "forms_blocks_textarea_path_idx": { + "name": "forms_blocks_textarea_path_idx", + "columns": [ + "_path" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_blocks_textarea_parent_id_fk": { + "name": "forms_blocks_textarea_parent_id_fk", + "tableFrom": "forms_blocks_textarea", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_blocks_textarea_locales": { + "name": "forms_blocks_textarea_locales", + "columns": { + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_value": { + "name": "default_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_blocks_textarea_locales_locale_parent_id_unique": { + "name": "forms_blocks_textarea_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_blocks_textarea_locales_parent_id_fk": { + "name": "forms_blocks_textarea_locales_parent_id_fk", + "tableFrom": "forms_blocks_textarea_locales", + "tableTo": "forms_blocks_textarea", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_emails": { + "name": "forms_emails", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "email_to": { + "name": "email_to", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cc": { + "name": "cc", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "bcc": { + "name": "bcc", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "reply_to": { + "name": "reply_to", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email_from": { + "name": "email_from", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_emails_order_idx": { + "name": "forms_emails_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "forms_emails_parent_id_idx": { + "name": "forms_emails_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_emails_parent_id_fk": { + "name": "forms_emails_parent_id_fk", + "tableFrom": "forms_emails", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_emails_locales": { + "name": "forms_emails_locales", + "columns": { + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'You''ve received a new message.'" + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_emails_locales_locale_parent_id_unique": { + "name": "forms_emails_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_emails_locales_parent_id_fk": { + "name": "forms_emails_locales_parent_id_fk", + "tableFrom": "forms_emails_locales", + "tableTo": "forms_emails", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms": { + "name": "forms", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "confirmation_type": { + "name": "confirmation_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'message'" + }, + "redirect_type": { + "name": "redirect_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'reference'" + }, + "redirect_url": { + "name": "redirect_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "forms_updated_at_idx": { + "name": "forms_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "forms_created_at_idx": { + "name": "forms_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_locales": { + "name": "forms_locales", + "columns": { + "submit_button_label": { + "name": "submit_button_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "confirmation_message": { + "name": "confirmation_message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "forms_locales_locale_parent_id_unique": { + "name": "forms_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "forms_locales_parent_id_fk": { + "name": "forms_locales_parent_id_fk", + "tableFrom": "forms_locales", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "forms_rels": { + "name": "forms_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "forms_rels_order_idx": { + "name": "forms_rels_order_idx", + "columns": [ + "order" + ], + "isUnique": false + }, + "forms_rels_parent_idx": { + "name": "forms_rels_parent_idx", + "columns": [ + "parent_id" + ], + "isUnique": false + }, + "forms_rels_path_idx": { + "name": "forms_rels_path_idx", + "columns": [ + "path" + ], + "isUnique": false + }, + "forms_rels_pages_id_idx": { + "name": "forms_rels_pages_id_idx", + "columns": [ + "pages_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "forms_rels_parent_fk": { + "name": "forms_rels_parent_fk", + "tableFrom": "forms_rels", + "tableTo": "forms", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "forms_rels_pages_fk": { + "name": "forms_rels_pages_fk", + "tableFrom": "forms_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "form_submissions_submission_data": { + "name": "form_submissions_submission_data", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "field": { + "name": "field", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "form_submissions_submission_data_order_idx": { + "name": "form_submissions_submission_data_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "form_submissions_submission_data_parent_id_idx": { + "name": "form_submissions_submission_data_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "form_submissions_submission_data_parent_id_fk": { + "name": "form_submissions_submission_data_parent_id_fk", + "tableFrom": "form_submissions_submission_data", + "tableTo": "form_submissions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "form_submissions": { + "name": "form_submissions", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "form_submissions_form_idx": { + "name": "form_submissions_form_idx", + "columns": [ + "form_id" + ], + "isUnique": false + }, + "form_submissions_updated_at_idx": { + "name": "form_submissions_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "form_submissions_created_at_idx": { + "name": "form_submissions_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "form_submissions_form_id_forms_id_fk": { + "name": "form_submissions_form_id_forms_id_fk", + "tableFrom": "form_submissions", + "tableTo": "forms", + "columnsFrom": [ + "form_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_kv": { + "name": "payload_kv", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + "key" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_locked_documents": { + "name": "payload_locked_documents", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "global_slug": { + "name": "global_slug", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + "global_slug" + ], + "isUnique": false + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "forms_id": { + "name": "forms_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_submissions_id": { + "name": "form_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + "order" + ], + "isUnique": false + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + "parent_id" + ], + "isUnique": false + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + "path" + ], + "isUnique": false + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + "users_id" + ], + "isUnique": false + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + "media_id" + ], + "isUnique": false + }, + "payload_locked_documents_rels_pages_id_idx": { + "name": "payload_locked_documents_rels_pages_id_idx", + "columns": [ + "pages_id" + ], + "isUnique": false + }, + "payload_locked_documents_rels_forms_id_idx": { + "name": "payload_locked_documents_rels_forms_id_idx", + "columns": [ + "forms_id" + ], + "isUnique": false + }, + "payload_locked_documents_rels_form_submissions_id_idx": { + "name": "payload_locked_documents_rels_form_submissions_id_idx", + "columns": [ + "form_submissions_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_pages_fk": { + "name": "payload_locked_documents_rels_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_forms_fk": { + "name": "payload_locked_documents_rels_forms_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "forms", + "columnsFrom": [ + "forms_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_form_submissions_fk": { + "name": "payload_locked_documents_rels_form_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "form_submissions", + "columnsFrom": [ + "form_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_preferences": { + "name": "payload_preferences", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + "key" + ], + "isUnique": false + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_preferences_rels": { + "name": "payload_preferences_rels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + "order" + ], + "isUnique": false + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + "parent_id" + ], + "isUnique": false + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + "path" + ], + "isUnique": false + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + "users_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payload_migrations": { + "name": "payload_migrations", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + "updated_at" + ], + "isUnique": false + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "company": { + "name": "company", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "nip": { + "name": "nip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'7542827484'" + }, + "regon": { + "name": "regon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'521920102'" + }, + "address": { + "name": "address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'ul. Opolska 7B'" + }, + "city": { + "name": "city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'45-960 Opole'" + }, + "phone": { + "name": "phone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'+48 668 973 737'" + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'it@intecion.com'" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "company_locales": { + "name": "company_locales", + "columns": { + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'POI CLEAN HOUSE Dariusz Król'" + }, + "short_name": { + "name": "short_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'POI Clean House'" + }, + "region": { + "name": "region", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Opole, woj. opolskie, dolnośląskie i śląskie'" + }, + "working_hours": { + "name": "working_hours", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Poniedziałek - Sobota: 7:00 - 20:00'" + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "company_locales_locale_parent_id_unique": { + "name": "company_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "company_locales_parent_id_fk": { + "name": "company_locales_parent_id_fk", + "tableFrom": "company_locales", + "tableTo": "company", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigation_header_items": { + "name": "navigation_header_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "navigation_header_items_order_idx": { + "name": "navigation_header_items_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "navigation_header_items_parent_id_idx": { + "name": "navigation_header_items_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "navigation_header_items_locale_idx": { + "name": "navigation_header_items_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + }, + "navigation_header_items_page_idx": { + "name": "navigation_header_items_page_idx", + "columns": [ + "page_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "navigation_header_items_page_id_pages_id_fk": { + "name": "navigation_header_items_page_id_pages_id_fk", + "tableFrom": "navigation_header_items", + "tableTo": "pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "navigation_header_items_parent_id_fk": { + "name": "navigation_header_items_parent_id_fk", + "tableFrom": "navigation_header_items", + "tableTo": "navigation", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigation_footer_items": { + "name": "navigation_footer_items", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "navigation_footer_items_order_idx": { + "name": "navigation_footer_items_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "navigation_footer_items_parent_id_idx": { + "name": "navigation_footer_items_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + }, + "navigation_footer_items_locale_idx": { + "name": "navigation_footer_items_locale_idx", + "columns": [ + "_locale" + ], + "isUnique": false + }, + "navigation_footer_items_page_idx": { + "name": "navigation_footer_items_page_idx", + "columns": [ + "page_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "navigation_footer_items_page_id_pages_id_fk": { + "name": "navigation_footer_items_page_id_pages_id_fk", + "tableFrom": "navigation_footer_items", + "tableTo": "pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "navigation_footer_items_parent_id_fk": { + "name": "navigation_footer_items_parent_id_fk", + "tableFrom": "navigation_footer_items", + "tableTo": "navigation", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigation": { + "name": "navigation", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "navigation_locales": { + "name": "navigation_locales", + "columns": { + "tagline": { + "name": "tagline", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Czyszczenie Kostki Brukowej'" + }, + "cta_button_label": { + "name": "cta_button_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Zadzwoń po wycenę'" + }, + "cta_button_page_id": { + "name": "cta_button_page_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cta_button_url": { + "name": "cta_button_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "footer_tagline": { + "name": "footer_tagline", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'Wyspecjalizowane usługi mycia gorącowodnego, usuwania mchu, odplamiania oleju, spoinowania i impregnacji hydrofobowej nawierzchni brukowych.'" + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "navigation_cta_button_cta_button_page_idx": { + "name": "navigation_cta_button_cta_button_page_idx", + "columns": [ + "cta_button_page_id" + ], + "isUnique": false + }, + "navigation_locales_locale_parent_id_unique": { + "name": "navigation_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "navigation_locales_cta_button_page_id_pages_id_fk": { + "name": "navigation_locales_cta_button_page_id_pages_id_fk", + "tableFrom": "navigation_locales", + "tableTo": "pages", + "columnsFrom": [ + "cta_button_page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "navigation_locales_parent_id_fk": { + "name": "navigation_locales_parent_id_fk", + "tableFrom": "navigation_locales", + "tableTo": "navigation", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "site_settings": { + "name": "site_settings", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "title_order": { + "name": "title_order", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'page-first'" + }, + "title_separator": { + "name": "title_separator", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'|'" + }, + "logo_id": { + "name": "logo_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_share_image_id": { + "name": "default_share_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "favicon_id": { + "name": "favicon_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_theme": { + "name": "default_theme", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'light'" + }, + "allow_theme_toggle": { + "name": "allow_theme_toggle", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "homepage_id": { + "name": "homepage_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "privacy_policy_id": { + "name": "privacy_policy_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cookie_policy_id": { + "name": "cookie_policy_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terms_of_service_id": { + "name": "terms_of_service_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "site_settings_logo_idx": { + "name": "site_settings_logo_idx", + "columns": [ + "logo_id" + ], + "isUnique": false + }, + "site_settings_default_share_image_idx": { + "name": "site_settings_default_share_image_idx", + "columns": [ + "default_share_image_id" + ], + "isUnique": false + }, + "site_settings_favicon_idx": { + "name": "site_settings_favicon_idx", + "columns": [ + "favicon_id" + ], + "isUnique": false + }, + "site_settings_homepage_idx": { + "name": "site_settings_homepage_idx", + "columns": [ + "homepage_id" + ], + "isUnique": false + }, + "site_settings_privacy_policy_idx": { + "name": "site_settings_privacy_policy_idx", + "columns": [ + "privacy_policy_id" + ], + "isUnique": false + }, + "site_settings_cookie_policy_idx": { + "name": "site_settings_cookie_policy_idx", + "columns": [ + "cookie_policy_id" + ], + "isUnique": false + }, + "site_settings_terms_of_service_idx": { + "name": "site_settings_terms_of_service_idx", + "columns": [ + "terms_of_service_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "site_settings_logo_id_media_id_fk": { + "name": "site_settings_logo_id_media_id_fk", + "tableFrom": "site_settings", + "tableTo": "media", + "columnsFrom": [ + "logo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_default_share_image_id_media_id_fk": { + "name": "site_settings_default_share_image_id_media_id_fk", + "tableFrom": "site_settings", + "tableTo": "media", + "columnsFrom": [ + "default_share_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_favicon_id_media_id_fk": { + "name": "site_settings_favicon_id_media_id_fk", + "tableFrom": "site_settings", + "tableTo": "media", + "columnsFrom": [ + "favicon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_homepage_id_pages_id_fk": { + "name": "site_settings_homepage_id_pages_id_fk", + "tableFrom": "site_settings", + "tableTo": "pages", + "columnsFrom": [ + "homepage_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_privacy_policy_id_pages_id_fk": { + "name": "site_settings_privacy_policy_id_pages_id_fk", + "tableFrom": "site_settings", + "tableTo": "pages", + "columnsFrom": [ + "privacy_policy_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_cookie_policy_id_pages_id_fk": { + "name": "site_settings_cookie_policy_id_pages_id_fk", + "tableFrom": "site_settings", + "tableTo": "pages", + "columnsFrom": [ + "cookie_policy_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_terms_of_service_id_pages_id_fk": { + "name": "site_settings_terms_of_service_id_pages_id_fk", + "tableFrom": "site_settings", + "tableTo": "pages", + "columnsFrom": [ + "terms_of_service_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "site_settings_locales": { + "name": "site_settings_locales", + "columns": { + "site_name": { + "name": "site_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "site_settings_locales_locale_parent_id_unique": { + "name": "site_settings_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "site_settings_locales_parent_id_fk": { + "name": "site_settings_locales_parent_id_fk", + "tableFrom": "site_settings_locales", + "tableTo": "site_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "site_integrations": { + "name": "site_integrations", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "ga4_measurement_id": { + "name": "ga4_measurement_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "gtm_container_id": { + "name": "gtm_container_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "turnstile_site_key": { + "name": "turnstile_site_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "turnstile_secret_key": { + "name": "turnstile_secret_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email_transport": { + "name": "email_transport", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'smtp'" + }, + "smtp_host": { + "name": "smtp_host", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "smtp_port": { + "name": "smtp_port", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 587 + }, + "smtp_user": { + "name": "smtp_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "smtp_password": { + "name": "smtp_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "smtp_from_address": { + "name": "smtp_from_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "smtp_from_name": { + "name": "smtp_from_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "r2_bucket": { + "name": "r2_bucket", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "r2_endpoint": { + "name": "r2_endpoint", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "r2_access_key_id": { + "name": "r2_access_key_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "r2_secret_access_key": { + "name": "r2_secret_access_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "cookie_settings_categories": { + "name": "cookie_settings_categories", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "cookie_settings_categories_order_idx": { + "name": "cookie_settings_categories_order_idx", + "columns": [ + "_order" + ], + "isUnique": false + }, + "cookie_settings_categories_parent_id_idx": { + "name": "cookie_settings_categories_parent_id_idx", + "columns": [ + "_parent_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "cookie_settings_categories_parent_id_fk": { + "name": "cookie_settings_categories_parent_id_fk", + "tableFrom": "cookie_settings_categories", + "tableTo": "cookie_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "cookie_settings_categories_locales": { + "name": "cookie_settings_categories_locales", + "columns": { + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "cookie_settings_categories_locales_locale_parent_id_unique": { + "name": "cookie_settings_categories_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "cookie_settings_categories_locales_parent_id_fk": { + "name": "cookie_settings_categories_locales_parent_id_fk", + "tableFrom": "cookie_settings_categories_locales", + "tableTo": "cookie_settings_categories", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "cookie_settings": { + "name": "cookie_settings", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "cookie_settings_locales": { + "name": "cookie_settings_locales", + "columns": { + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "settings_title": { + "name": "settings_title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "buttons_accept_all": { + "name": "buttons_accept_all", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "buttons_reject": { + "name": "buttons_reject", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "buttons_settings": { + "name": "buttons_settings", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "buttons_save": { + "name": "buttons_save", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "buttons_back": { + "name": "buttons_back", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "cookie_settings_locales_locale_parent_id_unique": { + "name": "cookie_settings_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "cookie_settings_locales_parent_id_fk": { + "name": "cookie_settings_locales_parent_id_fk", + "tableFrom": "cookie_settings_locales", + "tableTo": "cookie_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "notifications": { + "name": "notifications", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "notifications_locales": { + "name": "notifications_locales", + "columns": { + "form_success": { + "name": "form_success", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_error": { + "name": "form_error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_rate_limited": { + "name": "form_rate_limited", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_turnstile": { + "name": "form_turnstile", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_validation": { + "name": "form_validation", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_consent": { + "name": "form_consent", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "form_not_found": { + "name": "form_not_found", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "_locale": { + "name": "_locale", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "notifications_locales_locale_parent_id_unique": { + "name": "notifications_locales_locale_parent_id_unique", + "columns": [ + "_locale", + "_parent_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "notifications_locales_parent_id_fk": { + "name": "notifications_locales_parent_id_fk", + "tableFrom": "notifications_locales", + "tableTo": "notifications", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + }, + "id": "6a86ed5c-cc6c-4635-982d-217be4620622", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260826_005622_init.ts b/src/migrations/20260826_005622_init.ts new file mode 100644 index 0000000..b6ad410 --- /dev/null +++ b/src/migrations/20260826_005622_init.ts @@ -0,0 +1,1221 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-sqlite' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.run(sql`CREATE TABLE \`users_roles\` ( + \`order\` integer NOT NULL, + \`parent_id\` integer NOT NULL, + \`value\` text, + \`id\` integer PRIMARY KEY NOT NULL, + FOREIGN KEY (\`parent_id\`) REFERENCES \`users\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`users_roles_order_idx\` ON \`users_roles\` (\`order\`);`) + await db.run(sql`CREATE INDEX \`users_roles_parent_idx\` ON \`users_roles\` (\`parent_id\`);`) + await db.run(sql`CREATE TABLE \`users_sessions\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`created_at\` text, + \`expires_at\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`users\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`users_sessions_order_idx\` ON \`users_sessions\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`users_sessions_parent_id_idx\` ON \`users_sessions\` (\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`users\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`name\` text, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`email\` text NOT NULL, + \`reset_password_token\` text, + \`reset_password_expiration\` text, + \`salt\` text, + \`hash\` text, + \`login_attempts\` numeric DEFAULT 0, + \`lock_until\` text + ); + `) + await db.run(sql`CREATE INDEX \`users_updated_at_idx\` ON \`users\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`users_created_at_idx\` ON \`users\` (\`created_at\`);`) + await db.run(sql`CREATE UNIQUE INDEX \`users_email_idx\` ON \`users\` (\`email\`);`) + await db.run(sql`CREATE TABLE \`media\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`url\` text, + \`thumbnail_u_r_l\` text, + \`filename\` text, + \`mime_type\` text, + \`filesize\` numeric, + \`width\` numeric, + \`height\` numeric, + \`focal_x\` numeric, + \`focal_y\` numeric, + \`sizes_thumbnail_url\` text, + \`sizes_thumbnail_width\` numeric, + \`sizes_thumbnail_height\` numeric, + \`sizes_thumbnail_mime_type\` text, + \`sizes_thumbnail_filesize\` numeric, + \`sizes_thumbnail_filename\` text, + \`sizes_card_url\` text, + \`sizes_card_width\` numeric, + \`sizes_card_height\` numeric, + \`sizes_card_mime_type\` text, + \`sizes_card_filesize\` numeric, + \`sizes_card_filename\` text, + \`sizes_hero_url\` text, + \`sizes_hero_width\` numeric, + \`sizes_hero_height\` numeric, + \`sizes_hero_mime_type\` text, + \`sizes_hero_filesize\` numeric, + \`sizes_hero_filename\` text + ); + `) + await db.run(sql`CREATE INDEX \`media_updated_at_idx\` ON \`media\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`media_created_at_idx\` ON \`media\` (\`created_at\`);`) + await db.run(sql`CREATE UNIQUE INDEX \`media_filename_idx\` ON \`media\` (\`filename\`);`) + await db.run(sql`CREATE INDEX \`media_sizes_thumbnail_sizes_thumbnail_filename_idx\` ON \`media\` (\`sizes_thumbnail_filename\`);`) + await db.run(sql`CREATE INDEX \`media_sizes_card_sizes_card_filename_idx\` ON \`media\` (\`sizes_card_filename\`);`) + await db.run(sql`CREATE INDEX \`media_sizes_hero_sizes_hero_filename_idx\` ON \`media\` (\`sizes_hero_filename\`);`) + await db.run(sql`CREATE TABLE \`media_locales\` ( + \`alt\` text NOT NULL, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`media_locales_locale_parent_id_unique\` ON \`media_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_hero_trust_badges\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`text\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_hero\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_trust_badges_order_idx\` ON \`pages_blocks_hero_trust_badges\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_trust_badges_parent_id_idx\` ON \`pages_blocks_hero_trust_badges\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_trust_badges_locale_idx\` ON \`pages_blocks_hero_trust_badges\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_hero\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`cta_secondary_target_id\` integer, + \`background_image_id\` integer, + \`block_name\` text, + FOREIGN KEY (\`cta_secondary_target_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`background_image_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_order_idx\` ON \`pages_blocks_hero\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_parent_id_idx\` ON \`pages_blocks_hero\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_path_idx\` ON \`pages_blocks_hero\` (\`_path\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_cta_secondary_target_idx\` ON \`pages_blocks_hero\` (\`cta_secondary_target_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_hero_background_image_idx\` ON \`pages_blocks_hero\` (\`background_image_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_hero_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`cta_phone\` text, + \`cta_phone_label\` text, + \`cta_secondary_label\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_hero\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_hero_locales_locale_parent_id_unique\` ON \`pages_blocks_hero_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_problem_solution_items\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`problem_title\` text NOT NULL, + \`problem_description\` text NOT NULL, + \`solution_title\` text NOT NULL, + \`solution_description\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_problem_solution\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_problem_solution_items_order_idx\` ON \`pages_blocks_problem_solution_items\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_problem_solution_items_parent_id_idx\` ON \`pages_blocks_problem_solution_items\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_problem_solution_items_locale_idx\` ON \`pages_blocks_problem_solution_items\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_problem_solution\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_problem_solution_order_idx\` ON \`pages_blocks_problem_solution\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_problem_solution_parent_id_idx\` ON \`pages_blocks_problem_solution\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_problem_solution_path_idx\` ON \`pages_blocks_problem_solution\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_problem_solution_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_problem_solution\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_problem_solution_locales_locale_parent_id_uniqu\` ON \`pages_blocks_problem_solution_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_process_steps_steps\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`step_number\` text NOT NULL, + \`title\` text NOT NULL, + \`description\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_process_steps\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_process_steps_steps_order_idx\` ON \`pages_blocks_process_steps_steps\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_process_steps_steps_parent_id_idx\` ON \`pages_blocks_process_steps_steps\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_process_steps_steps_locale_idx\` ON \`pages_blocks_process_steps_steps\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_process_steps\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_process_steps_order_idx\` ON \`pages_blocks_process_steps\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_process_steps_parent_id_idx\` ON \`pages_blocks_process_steps\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_process_steps_path_idx\` ON \`pages_blocks_process_steps\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_process_steps_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_process_steps\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_process_steps_locales_locale_parent_id_unique\` ON \`pages_blocks_process_steps_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_before_after_gallery_items\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`title\` text NOT NULL, + \`category\` text, + \`before_image_id\` integer, + \`after_image_id\` integer, + \`description\` text, + FOREIGN KEY (\`before_image_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`after_image_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_before_after_gallery\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_items_order_idx\` ON \`pages_blocks_before_after_gallery_items\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_items_parent_id_idx\` ON \`pages_blocks_before_after_gallery_items\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_items_locale_idx\` ON \`pages_blocks_before_after_gallery_items\` (\`_locale\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_items_before_image_idx\` ON \`pages_blocks_before_after_gallery_items\` (\`before_image_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_items_after_image_idx\` ON \`pages_blocks_before_after_gallery_items\` (\`after_image_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_before_after_gallery\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_order_idx\` ON \`pages_blocks_before_after_gallery\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_parent_id_idx\` ON \`pages_blocks_before_after_gallery\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_before_after_gallery_path_idx\` ON \`pages_blocks_before_after_gallery\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_before_after_gallery_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_before_after_gallery\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_before_after_gallery_locales_locale_parent_id_u\` ON \`pages_blocks_before_after_gallery_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_pricing_table_packages_features\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`feature\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_pricing_table_packages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_packages_features_order_idx\` ON \`pages_blocks_pricing_table_packages_features\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_packages_features_parent_id_idx\` ON \`pages_blocks_pricing_table_packages_features\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_packages_features_locale_idx\` ON \`pages_blocks_pricing_table_packages_features\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_pricing_table_packages\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`price\` text NOT NULL, + \`description\` text, + \`is_popular\` integer DEFAULT false, + \`cta_label\` text DEFAULT 'Zamów wycenę', + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_pricing_table\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_packages_order_idx\` ON \`pages_blocks_pricing_table_packages\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_packages_parent_id_idx\` ON \`pages_blocks_pricing_table_packages\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_packages_locale_idx\` ON \`pages_blocks_pricing_table_packages\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_pricing_table\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_order_idx\` ON \`pages_blocks_pricing_table\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_parent_id_idx\` ON \`pages_blocks_pricing_table\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_pricing_table_path_idx\` ON \`pages_blocks_pricing_table\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_pricing_table_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`disclaimer\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_pricing_table\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_pricing_table_locales_locale_parent_id_unique\` ON \`pages_blocks_pricing_table_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_tech_equipment_items\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`title\` text NOT NULL, + \`description\` text NOT NULL, + \`image_id\` integer, + FOREIGN KEY (\`image_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_tech_equipment\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_tech_equipment_items_order_idx\` ON \`pages_blocks_tech_equipment_items\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_tech_equipment_items_parent_id_idx\` ON \`pages_blocks_tech_equipment_items\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_tech_equipment_items_locale_idx\` ON \`pages_blocks_tech_equipment_items\` (\`_locale\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_tech_equipment_items_image_idx\` ON \`pages_blocks_tech_equipment_items\` (\`image_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_tech_equipment\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_tech_equipment_order_idx\` ON \`pages_blocks_tech_equipment\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_tech_equipment_parent_id_idx\` ON \`pages_blocks_tech_equipment\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_tech_equipment_path_idx\` ON \`pages_blocks_tech_equipment\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_tech_equipment_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_tech_equipment\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_tech_equipment_locales_locale_parent_id_unique\` ON \`pages_blocks_tech_equipment_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_faq_accordion_items\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`question\` text NOT NULL, + \`answer\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_faq_accordion\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_faq_accordion_items_order_idx\` ON \`pages_blocks_faq_accordion_items\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_faq_accordion_items_parent_id_idx\` ON \`pages_blocks_faq_accordion_items\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_faq_accordion_items_locale_idx\` ON \`pages_blocks_faq_accordion_items\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_faq_accordion\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_faq_accordion_order_idx\` ON \`pages_blocks_faq_accordion\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_faq_accordion_parent_id_idx\` ON \`pages_blocks_faq_accordion\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_faq_accordion_path_idx\` ON \`pages_blocks_faq_accordion\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_faq_accordion_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_faq_accordion\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_faq_accordion_locales_locale_parent_id_unique\` ON \`pages_blocks_faq_accordion_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_reviews_items\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`author\` text NOT NULL, + \`location\` text, + \`rating\` numeric DEFAULT 5, + \`content\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_reviews\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_reviews_items_order_idx\` ON \`pages_blocks_reviews_items\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_reviews_items_parent_id_idx\` ON \`pages_blocks_reviews_items\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_reviews_items_locale_idx\` ON \`pages_blocks_reviews_items\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_reviews\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_reviews_order_idx\` ON \`pages_blocks_reviews\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_reviews_parent_id_idx\` ON \`pages_blocks_reviews\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_reviews_path_idx\` ON \`pages_blocks_reviews\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_reviews_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_reviews\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_reviews_locales_locale_parent_id_unique\` ON \`pages_blocks_reviews_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_form_block\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_form_block_order_idx\` ON \`pages_blocks_form_block\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_form_block_parent_id_idx\` ON \`pages_blocks_form_block\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_form_block_path_idx\` ON \`pages_blocks_form_block\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_form_block_locales\` ( + \`badge\` text, + \`heading\` text NOT NULL, + \`subheading\` text, + \`phone\` text, + \`email\` text, + \`working_hours\` text, + \`submit_button_text\` text DEFAULT 'Wyślij zapytanie o bezpłatną wycenę', + \`consent_text\` text DEFAULT 'Wyrażam zgodę na przetwarzanie moich danych osobowych w celu kontaktu i przygotowania oferty zgodnie z Polityką Prywatności.', + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_form_block\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_form_block_locales_locale_parent_id_unique\` ON \`pages_blocks_form_block_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_content\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_content_order_idx\` ON \`pages_blocks_content\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_content_parent_id_idx\` ON \`pages_blocks_content\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_content_path_idx\` ON \`pages_blocks_content\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_content_locales\` ( + \`badge\` text, + \`heading\` text, + \`body\` text NOT NULL, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_content\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_content_locales_locale_parent_id_unique\` ON \`pages_blocks_content_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_blog_list_articles\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`title\` text NOT NULL, + \`category\` text NOT NULL, + \`read_time\` text DEFAULT '4 min czytania', + \`date\` text DEFAULT '2026', + \`excerpt\` text NOT NULL, + \`content\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_blog_list\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_blog_list_articles_order_idx\` ON \`pages_blocks_blog_list_articles\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_blog_list_articles_parent_id_idx\` ON \`pages_blocks_blog_list_articles\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_blog_list_articles_locale_idx\` ON \`pages_blocks_blog_list_articles\` (\`_locale\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_blog_list\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_blocks_blog_list_order_idx\` ON \`pages_blocks_blog_list\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_blog_list_parent_id_idx\` ON \`pages_blocks_blog_list\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`pages_blocks_blog_list_path_idx\` ON \`pages_blocks_blog_list\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`pages_blocks_blog_list_locales\` ( + \`badge\` text DEFAULT 'Baza Wiedzy & Porady', + \`heading\` text DEFAULT 'Poradnik czyszczenia i pielęgnacji kostki brukowej' NOT NULL, + \`subheading\` text DEFAULT 'Praktyczne wskazówki ekspertów: jak usuwać trudne plamy, kiedy impregnować nawierzchnię i dlaczego temperatura wody decyduje o skuteczności czyszczenia.', + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages_blocks_blog_list\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`pages_blocks_blog_list_locales_locale_parent_id_unique\` ON \`pages_blocks_blog_list_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`pages\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL + ); + `) + await db.run(sql`CREATE INDEX \`pages_updated_at_idx\` ON \`pages\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`pages_created_at_idx\` ON \`pages\` (\`created_at\`);`) + await db.run(sql`CREATE TABLE \`pages_locales\` ( + \`title\` text NOT NULL, + \`slug\` text NOT NULL, + \`meta_title\` text, + \`meta_description\` text, + \`meta_image_id\` integer, + \`meta_title_override\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`meta_image_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`pages_slug_idx\` ON \`pages_locales\` (\`slug\`,\`_locale\`);`) + await db.run(sql`CREATE INDEX \`pages_meta_meta_image_idx\` ON \`pages_locales\` (\`meta_image_id\`,\`_locale\`);`) + await db.run(sql`CREATE UNIQUE INDEX \`pages_locales_locale_parent_id_unique\` ON \`pages_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_checkbox\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`required\` integer, + \`default_value\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_checkbox_order_idx\` ON \`forms_blocks_checkbox\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_checkbox_parent_id_idx\` ON \`forms_blocks_checkbox\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_checkbox_path_idx\` ON \`forms_blocks_checkbox\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_checkbox_locales\` ( + \`label\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_checkbox\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_checkbox_locales_locale_parent_id_unique\` ON \`forms_blocks_checkbox_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_country\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`required\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_country_order_idx\` ON \`forms_blocks_country\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_country_parent_id_idx\` ON \`forms_blocks_country\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_country_path_idx\` ON \`forms_blocks_country\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_country_locales\` ( + \`label\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_country\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_country_locales_locale_parent_id_unique\` ON \`forms_blocks_country_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_email\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`required\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_email_order_idx\` ON \`forms_blocks_email\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_email_parent_id_idx\` ON \`forms_blocks_email\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_email_path_idx\` ON \`forms_blocks_email\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_email_locales\` ( + \`label\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_email\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_email_locales_locale_parent_id_unique\` ON \`forms_blocks_email_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_message\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_message_order_idx\` ON \`forms_blocks_message\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_message_parent_id_idx\` ON \`forms_blocks_message\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_message_path_idx\` ON \`forms_blocks_message\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_message_locales\` ( + \`message\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_message\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_message_locales_locale_parent_id_unique\` ON \`forms_blocks_message_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_number\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`default_value\` numeric, + \`required\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_number_order_idx\` ON \`forms_blocks_number\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_number_parent_id_idx\` ON \`forms_blocks_number\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_number_path_idx\` ON \`forms_blocks_number\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_number_locales\` ( + \`label\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_number\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_number_locales_locale_parent_id_unique\` ON \`forms_blocks_number_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_select_options\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`value\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_select\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_select_options_order_idx\` ON \`forms_blocks_select_options\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_select_options_parent_id_idx\` ON \`forms_blocks_select_options\` (\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_select_options_locales\` ( + \`label\` text NOT NULL, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_select_options\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_select_options_locales_locale_parent_id_unique\` ON \`forms_blocks_select_options_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_select\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`placeholder\` text, + \`required\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_select_order_idx\` ON \`forms_blocks_select\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_select_parent_id_idx\` ON \`forms_blocks_select\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_select_path_idx\` ON \`forms_blocks_select\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_select_locales\` ( + \`label\` text, + \`default_value\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_select\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_select_locales_locale_parent_id_unique\` ON \`forms_blocks_select_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_state\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`required\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_state_order_idx\` ON \`forms_blocks_state\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_state_parent_id_idx\` ON \`forms_blocks_state\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_state_path_idx\` ON \`forms_blocks_state\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_state_locales\` ( + \`label\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_state\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_state_locales_locale_parent_id_unique\` ON \`forms_blocks_state_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_text\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`required\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_text_order_idx\` ON \`forms_blocks_text\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_text_parent_id_idx\` ON \`forms_blocks_text\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_text_path_idx\` ON \`forms_blocks_text\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_text_locales\` ( + \`label\` text, + \`default_value\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_text\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_text_locales_locale_parent_id_unique\` ON \`forms_blocks_text_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_textarea\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_path\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`name\` text NOT NULL, + \`width\` numeric, + \`required\` integer, + \`block_name\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_blocks_textarea_order_idx\` ON \`forms_blocks_textarea\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_textarea_parent_id_idx\` ON \`forms_blocks_textarea\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_blocks_textarea_path_idx\` ON \`forms_blocks_textarea\` (\`_path\`);`) + await db.run(sql`CREATE TABLE \`forms_blocks_textarea_locales\` ( + \`label\` text, + \`default_value\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_blocks_textarea\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_blocks_textarea_locales_locale_parent_id_unique\` ON \`forms_blocks_textarea_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_emails\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`email_to\` text, + \`cc\` text, + \`bcc\` text, + \`reply_to\` text, + \`email_from\` text, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_emails_order_idx\` ON \`forms_emails\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`forms_emails_parent_id_idx\` ON \`forms_emails\` (\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_emails_locales\` ( + \`subject\` text DEFAULT 'You''ve received a new message.' NOT NULL, + \`message\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms_emails\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_emails_locales_locale_parent_id_unique\` ON \`forms_emails_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`title\` text NOT NULL, + \`confirmation_type\` text DEFAULT 'message', + \`redirect_type\` text DEFAULT 'reference', + \`redirect_url\` text, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL + ); + `) + await db.run(sql`CREATE INDEX \`forms_updated_at_idx\` ON \`forms\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`forms_created_at_idx\` ON \`forms\` (\`created_at\`);`) + await db.run(sql`CREATE TABLE \`forms_locales\` ( + \`submit_button_label\` text, + \`confirmation_message\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`forms_locales_locale_parent_id_unique\` ON \`forms_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`forms_rels\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`order\` integer, + \`parent_id\` integer NOT NULL, + \`path\` text NOT NULL, + \`pages_id\` integer, + FOREIGN KEY (\`parent_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (\`pages_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`forms_rels_order_idx\` ON \`forms_rels\` (\`order\`);`) + await db.run(sql`CREATE INDEX \`forms_rels_parent_idx\` ON \`forms_rels\` (\`parent_id\`);`) + await db.run(sql`CREATE INDEX \`forms_rels_path_idx\` ON \`forms_rels\` (\`path\`);`) + await db.run(sql`CREATE INDEX \`forms_rels_pages_id_idx\` ON \`forms_rels\` (\`pages_id\`);`) + await db.run(sql`CREATE TABLE \`form_submissions_submission_data\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`field\` text NOT NULL, + \`value\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`form_submissions\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`form_submissions_submission_data_order_idx\` ON \`form_submissions_submission_data\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`form_submissions_submission_data_parent_id_idx\` ON \`form_submissions_submission_data\` (\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`form_submissions\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`form_id\` integer NOT NULL, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + FOREIGN KEY (\`form_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE set null + ); + `) + await db.run(sql`CREATE INDEX \`form_submissions_form_idx\` ON \`form_submissions\` (\`form_id\`);`) + await db.run(sql`CREATE INDEX \`form_submissions_updated_at_idx\` ON \`form_submissions\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`form_submissions_created_at_idx\` ON \`form_submissions\` (\`created_at\`);`) + await db.run(sql`CREATE TABLE \`payload_kv\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`key\` text NOT NULL, + \`data\` text NOT NULL + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`payload_kv_key_idx\` ON \`payload_kv\` (\`key\`);`) + await db.run(sql`CREATE TABLE \`payload_locked_documents\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`global_slug\` text, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL + ); + `) + await db.run(sql`CREATE INDEX \`payload_locked_documents_global_slug_idx\` ON \`payload_locked_documents\` (\`global_slug\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_updated_at_idx\` ON \`payload_locked_documents\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_created_at_idx\` ON \`payload_locked_documents\` (\`created_at\`);`) + await db.run(sql`CREATE TABLE \`payload_locked_documents_rels\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`order\` integer, + \`parent_id\` integer NOT NULL, + \`path\` text NOT NULL, + \`users_id\` integer, + \`media_id\` integer, + \`pages_id\` integer, + \`forms_id\` integer, + \`form_submissions_id\` integer, + FOREIGN KEY (\`parent_id\`) REFERENCES \`payload_locked_documents\`(\`id\`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (\`users_id\`) REFERENCES \`users\`(\`id\`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (\`media_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (\`pages_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (\`forms_id\`) REFERENCES \`forms\`(\`id\`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (\`form_submissions_id\`) REFERENCES \`form_submissions\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_order_idx\` ON \`payload_locked_documents_rels\` (\`order\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_parent_idx\` ON \`payload_locked_documents_rels\` (\`parent_id\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_path_idx\` ON \`payload_locked_documents_rels\` (\`path\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_users_id_idx\` ON \`payload_locked_documents_rels\` (\`users_id\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_media_id_idx\` ON \`payload_locked_documents_rels\` (\`media_id\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_pages_id_idx\` ON \`payload_locked_documents_rels\` (\`pages_id\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_forms_id_idx\` ON \`payload_locked_documents_rels\` (\`forms_id\`);`) + await db.run(sql`CREATE INDEX \`payload_locked_documents_rels_form_submissions_id_idx\` ON \`payload_locked_documents_rels\` (\`form_submissions_id\`);`) + await db.run(sql`CREATE TABLE \`payload_preferences\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`key\` text, + \`value\` text, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL + ); + `) + await db.run(sql`CREATE INDEX \`payload_preferences_key_idx\` ON \`payload_preferences\` (\`key\`);`) + await db.run(sql`CREATE INDEX \`payload_preferences_updated_at_idx\` ON \`payload_preferences\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`payload_preferences_created_at_idx\` ON \`payload_preferences\` (\`created_at\`);`) + await db.run(sql`CREATE TABLE \`payload_preferences_rels\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`order\` integer, + \`parent_id\` integer NOT NULL, + \`path\` text NOT NULL, + \`users_id\` integer, + FOREIGN KEY (\`parent_id\`) REFERENCES \`payload_preferences\`(\`id\`) ON UPDATE no action ON DELETE cascade, + FOREIGN KEY (\`users_id\`) REFERENCES \`users\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`payload_preferences_rels_order_idx\` ON \`payload_preferences_rels\` (\`order\`);`) + await db.run(sql`CREATE INDEX \`payload_preferences_rels_parent_idx\` ON \`payload_preferences_rels\` (\`parent_id\`);`) + await db.run(sql`CREATE INDEX \`payload_preferences_rels_path_idx\` ON \`payload_preferences_rels\` (\`path\`);`) + await db.run(sql`CREATE INDEX \`payload_preferences_rels_users_id_idx\` ON \`payload_preferences_rels\` (\`users_id\`);`) + await db.run(sql`CREATE TABLE \`payload_migrations\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`name\` text, + \`batch\` numeric, + \`updated_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL, + \`created_at\` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL + ); + `) + await db.run(sql`CREATE INDEX \`payload_migrations_updated_at_idx\` ON \`payload_migrations\` (\`updated_at\`);`) + await db.run(sql`CREATE INDEX \`payload_migrations_created_at_idx\` ON \`payload_migrations\` (\`created_at\`);`) + await db.run(sql`CREATE TABLE \`company\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`nip\` text DEFAULT '7542827484', + \`regon\` text DEFAULT '521920102', + \`address\` text DEFAULT 'ul. Opolska 7B', + \`city\` text DEFAULT '45-960 Opole', + \`phone\` text DEFAULT '+48 668 973 737', + \`email\` text DEFAULT 'it@intecion.com', + \`updated_at\` text, + \`created_at\` text + ); + `) + await db.run(sql`CREATE TABLE \`company_locales\` ( + \`name\` text DEFAULT 'POI CLEAN HOUSE Dariusz Król' NOT NULL, + \`short_name\` text DEFAULT 'POI Clean House', + \`region\` text DEFAULT 'Opole, woj. opolskie, dolnośląskie i śląskie', + \`working_hours\` text DEFAULT 'Poniedziałek - Sobota: 7:00 - 20:00', + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`company\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`company_locales_locale_parent_id_unique\` ON \`company_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`navigation_header_items\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`label\` text NOT NULL, + \`page_id\` integer, + \`url\` text, + FOREIGN KEY (\`page_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`navigation\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`navigation_header_items_order_idx\` ON \`navigation_header_items\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`navigation_header_items_parent_id_idx\` ON \`navigation_header_items\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`navigation_header_items_locale_idx\` ON \`navigation_header_items\` (\`_locale\`);`) + await db.run(sql`CREATE INDEX \`navigation_header_items_page_idx\` ON \`navigation_header_items\` (\`page_id\`);`) + await db.run(sql`CREATE TABLE \`navigation_footer_items\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`_locale\` text NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`label\` text NOT NULL, + \`page_id\` integer, + \`url\` text, + FOREIGN KEY (\`page_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`navigation\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`navigation_footer_items_order_idx\` ON \`navigation_footer_items\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`navigation_footer_items_parent_id_idx\` ON \`navigation_footer_items\` (\`_parent_id\`);`) + await db.run(sql`CREATE INDEX \`navigation_footer_items_locale_idx\` ON \`navigation_footer_items\` (\`_locale\`);`) + await db.run(sql`CREATE INDEX \`navigation_footer_items_page_idx\` ON \`navigation_footer_items\` (\`page_id\`);`) + await db.run(sql`CREATE TABLE \`navigation\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`updated_at\` text, + \`created_at\` text + ); + `) + await db.run(sql`CREATE TABLE \`navigation_locales\` ( + \`tagline\` text DEFAULT 'Czyszczenie Kostki Brukowej', + \`cta_button_label\` text DEFAULT 'Zadzwoń po wycenę', + \`cta_button_page_id\` integer, + \`cta_button_url\` text, + \`footer_tagline\` text DEFAULT 'Wyspecjalizowane usługi mycia gorącowodnego, usuwania mchu, odplamiania oleju, spoinowania i impregnacji hydrofobowej nawierzchni brukowych.', + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`cta_button_page_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`navigation\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`navigation_cta_button_cta_button_page_idx\` ON \`navigation_locales\` (\`cta_button_page_id\`);`) + await db.run(sql`CREATE UNIQUE INDEX \`navigation_locales_locale_parent_id_unique\` ON \`navigation_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`site_settings\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`title_order\` text DEFAULT 'page-first', + \`title_separator\` text DEFAULT '|', + \`logo_id\` integer, + \`default_share_image_id\` integer, + \`favicon_id\` integer, + \`default_theme\` text DEFAULT 'light' NOT NULL, + \`allow_theme_toggle\` integer DEFAULT true, + \`homepage_id\` integer, + \`privacy_policy_id\` integer, + \`cookie_policy_id\` integer, + \`terms_of_service_id\` integer, + \`updated_at\` text, + \`created_at\` text, + FOREIGN KEY (\`logo_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`default_share_image_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`favicon_id\`) REFERENCES \`media\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`homepage_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`privacy_policy_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`cookie_policy_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null, + FOREIGN KEY (\`terms_of_service_id\`) REFERENCES \`pages\`(\`id\`) ON UPDATE no action ON DELETE set null + ); + `) + await db.run(sql`CREATE INDEX \`site_settings_logo_idx\` ON \`site_settings\` (\`logo_id\`);`) + await db.run(sql`CREATE INDEX \`site_settings_default_share_image_idx\` ON \`site_settings\` (\`default_share_image_id\`);`) + await db.run(sql`CREATE INDEX \`site_settings_favicon_idx\` ON \`site_settings\` (\`favicon_id\`);`) + await db.run(sql`CREATE INDEX \`site_settings_homepage_idx\` ON \`site_settings\` (\`homepage_id\`);`) + await db.run(sql`CREATE INDEX \`site_settings_privacy_policy_idx\` ON \`site_settings\` (\`privacy_policy_id\`);`) + await db.run(sql`CREATE INDEX \`site_settings_cookie_policy_idx\` ON \`site_settings\` (\`cookie_policy_id\`);`) + await db.run(sql`CREATE INDEX \`site_settings_terms_of_service_idx\` ON \`site_settings\` (\`terms_of_service_id\`);`) + await db.run(sql`CREATE TABLE \`site_settings_locales\` ( + \`site_name\` text NOT NULL, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`site_settings\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`site_settings_locales_locale_parent_id_unique\` ON \`site_settings_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`site_integrations\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`ga4_measurement_id\` text, + \`gtm_container_id\` text, + \`turnstile_site_key\` text, + \`turnstile_secret_key\` text, + \`email_transport\` text DEFAULT 'smtp', + \`smtp_host\` text, + \`smtp_port\` numeric DEFAULT 587, + \`smtp_user\` text, + \`smtp_password\` text, + \`smtp_from_address\` text, + \`smtp_from_name\` text, + \`r2_bucket\` text, + \`r2_endpoint\` text, + \`r2_access_key_id\` text, + \`r2_secret_access_key\` text, + \`updated_at\` text, + \`created_at\` text + ); + `) + await db.run(sql`CREATE TABLE \`cookie_settings_categories\` ( + \`_order\` integer NOT NULL, + \`_parent_id\` integer NOT NULL, + \`id\` text PRIMARY KEY NOT NULL, + \`key\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`cookie_settings\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE INDEX \`cookie_settings_categories_order_idx\` ON \`cookie_settings_categories\` (\`_order\`);`) + await db.run(sql`CREATE INDEX \`cookie_settings_categories_parent_id_idx\` ON \`cookie_settings_categories\` (\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`cookie_settings_categories_locales\` ( + \`title\` text, + \`description\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` text NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`cookie_settings_categories\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`cookie_settings_categories_locales_locale_parent_id_unique\` ON \`cookie_settings_categories_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`cookie_settings\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`updated_at\` text, + \`created_at\` text + ); + `) + await db.run(sql`CREATE TABLE \`cookie_settings_locales\` ( + \`message\` text, + \`settings_title\` text, + \`buttons_accept_all\` text, + \`buttons_reject\` text, + \`buttons_settings\` text, + \`buttons_save\` text, + \`buttons_back\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`cookie_settings\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`cookie_settings_locales_locale_parent_id_unique\` ON \`cookie_settings_locales\` (\`_locale\`,\`_parent_id\`);`) + await db.run(sql`CREATE TABLE \`notifications\` ( + \`id\` integer PRIMARY KEY NOT NULL, + \`updated_at\` text, + \`created_at\` text + ); + `) + await db.run(sql`CREATE TABLE \`notifications_locales\` ( + \`form_success\` text, + \`form_error\` text, + \`form_rate_limited\` text, + \`form_turnstile\` text, + \`form_validation\` text, + \`form_consent\` text, + \`form_not_found\` text, + \`id\` integer PRIMARY KEY NOT NULL, + \`_locale\` text NOT NULL, + \`_parent_id\` integer NOT NULL, + FOREIGN KEY (\`_parent_id\`) REFERENCES \`notifications\`(\`id\`) ON UPDATE no action ON DELETE cascade + ); + `) + await db.run(sql`CREATE UNIQUE INDEX \`notifications_locales_locale_parent_id_unique\` ON \`notifications_locales\` (\`_locale\`,\`_parent_id\`);`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.run(sql`DROP TABLE \`users_roles\`;`) + await db.run(sql`DROP TABLE \`users_sessions\`;`) + await db.run(sql`DROP TABLE \`users\`;`) + await db.run(sql`DROP TABLE \`media\`;`) + await db.run(sql`DROP TABLE \`media_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_hero_trust_badges\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_hero\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_hero_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_problem_solution_items\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_problem_solution\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_problem_solution_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_process_steps_steps\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_process_steps\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_process_steps_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_before_after_gallery_items\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_before_after_gallery\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_before_after_gallery_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_pricing_table_packages_features\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_pricing_table_packages\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_pricing_table\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_pricing_table_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_tech_equipment_items\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_tech_equipment\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_tech_equipment_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_faq_accordion_items\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_faq_accordion\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_faq_accordion_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_reviews_items\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_reviews\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_reviews_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_form_block\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_form_block_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_content\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_content_locales\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_blog_list_articles\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_blog_list\`;`) + await db.run(sql`DROP TABLE \`pages_blocks_blog_list_locales\`;`) + await db.run(sql`DROP TABLE \`pages\`;`) + await db.run(sql`DROP TABLE \`pages_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_checkbox\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_checkbox_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_country\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_country_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_email\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_email_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_message\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_message_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_number\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_number_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_select_options\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_select_options_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_select\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_select_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_state\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_state_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_text\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_text_locales\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_textarea\`;`) + await db.run(sql`DROP TABLE \`forms_blocks_textarea_locales\`;`) + await db.run(sql`DROP TABLE \`forms_emails\`;`) + await db.run(sql`DROP TABLE \`forms_emails_locales\`;`) + await db.run(sql`DROP TABLE \`forms\`;`) + await db.run(sql`DROP TABLE \`forms_locales\`;`) + await db.run(sql`DROP TABLE \`forms_rels\`;`) + await db.run(sql`DROP TABLE \`form_submissions_submission_data\`;`) + await db.run(sql`DROP TABLE \`form_submissions\`;`) + await db.run(sql`DROP TABLE \`payload_kv\`;`) + await db.run(sql`DROP TABLE \`payload_locked_documents\`;`) + await db.run(sql`DROP TABLE \`payload_locked_documents_rels\`;`) + await db.run(sql`DROP TABLE \`payload_preferences\`;`) + await db.run(sql`DROP TABLE \`payload_preferences_rels\`;`) + await db.run(sql`DROP TABLE \`payload_migrations\`;`) + await db.run(sql`DROP TABLE \`company\`;`) + await db.run(sql`DROP TABLE \`company_locales\`;`) + await db.run(sql`DROP TABLE \`navigation_header_items\`;`) + await db.run(sql`DROP TABLE \`navigation_footer_items\`;`) + await db.run(sql`DROP TABLE \`navigation\`;`) + await db.run(sql`DROP TABLE \`navigation_locales\`;`) + await db.run(sql`DROP TABLE \`site_settings\`;`) + await db.run(sql`DROP TABLE \`site_settings_locales\`;`) + await db.run(sql`DROP TABLE \`site_integrations\`;`) + await db.run(sql`DROP TABLE \`cookie_settings_categories\`;`) + await db.run(sql`DROP TABLE \`cookie_settings_categories_locales\`;`) + await db.run(sql`DROP TABLE \`cookie_settings\`;`) + await db.run(sql`DROP TABLE \`cookie_settings_locales\`;`) + await db.run(sql`DROP TABLE \`notifications\`;`) + await db.run(sql`DROP TABLE \`notifications_locales\`;`) +} diff --git a/src/migrations/index.ts b/src/migrations/index.ts new file mode 100644 index 0000000..44cc36d --- /dev/null +++ b/src/migrations/index.ts @@ -0,0 +1,9 @@ +import * as migration_20260826_005622_init from './20260826_005622_init'; + +export const migrations = [ + { + up: migration_20260826_005622_init.up, + down: migration_20260826_005622_init.down, + name: '20260826_005622_init' + }, +]; diff --git a/src/payload.config.ts b/src/payload.config.ts index a582129..6daecd2 100644 --- a/src/payload.config.ts +++ b/src/payload.config.ts @@ -14,6 +14,7 @@ import { Company } from './globals/Company' import { Navigation } from './globals/Navigation' import { seed } from './seed' +import { migrations } from './migrations' const filename = fileURLToPath(import.meta.url) const dirname = path.dirname(filename) @@ -37,6 +38,7 @@ export default buildConfig({ client: { url: process.env.DATABASE_URI || 'file:./dev.db', }, + prodMigrations: migrations, }), email: mailAdapter(), onInit: async (payload) => {