Fixes https://github.com/payloadcms/payload/issues/11882 Previously, down migration that dropped the `payload_migrations` table was failing because `migrationTableExists` doesn't check the current transaction, only in which you can get a `false` value result.
464 lines
13 KiB
JSON
464 lines
13 KiB
JSON
{
|
|
"version": "6",
|
|
"dialect": "sqlite",
|
|
"tables": {
|
|
"users": {
|
|
"name": "users",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"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": {}
|
|
},
|
|
"payload_locked_documents": {
|
|
"name": "payload_locked_documents",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"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
|
|
}
|
|
},
|
|
"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
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"payload_preferences": {
|
|
"name": "payload_preferences",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"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": true
|
|
},
|
|
"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": {}
|
|
}
|
|
},
|
|
"views": {},
|
|
"enums": {},
|
|
"_meta": {
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"indexes": {}
|
|
},
|
|
"id": "2b2f5008-c761-40d0-a858-67d6b4233615",
|
|
"prevId": "00000000-0000-0000-0000-000000000000"
|
|
}
|