Log in
Model

CreateViewsBackup

Magento\Backup\Model\ResourceModel\View\CreateViewsBackup

What it does

This class creates backups of database views in Magento 2.

Developers would use this during the backup process to ensure all database views are properly exported with their CREATE statements, allowing them to be restored later.

It handles retrieving view definitions, removing DEFINER clauses for portability, and writing formatted SQL statements to the backup file.

Public Methods

  • execute()
  • getViewHeader()
  • getDropViewSql()