← All changes
|
backend/src/Services/InstallActions/ActivationDatabaseHook.php
+69
-0
0.6.1
→
1.5
View file →
| @@ -1,0 +1,69 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * Database hook for activation | |
| 5 | + */ | |
| 6 | + | |
| 7 | +namespace IvyForms\Services\InstallActions; | |
| 8 | + | |
| 9 | +use IvyForms\Services\InstallActions\DB\Confirmation\ConfirmationsTable; | |
| 10 | +use IvyForms\Services\InstallActions\DB\Entry\EntriesTable; | |
| 11 | +use IvyForms\Services\InstallActions\DB\EntryField\EntryFieldsTable; | |
| 12 | +use IvyForms\Services\InstallActions\DB\Field\FieldsTable; | |
| 13 | +use IvyForms\Services\InstallActions\DB\Form\FormsTable; | |
| 14 | +use IvyForms\Services\InstallActions\DB\Notification\NotificationsTable; | |
| 15 | +use IvyForms\Services\InstallActions\DB\FieldOptions\FieldOptionsTable; | |
| 16 | +use IvyForms\Services\InstallActions\DB\GoogleSheets\GoogleSheetsTable; | |
| 17 | +use IvyForms\Services\InstallActions\DB\Payment\OrdersTable; | |
| 18 | +use IvyForms\Services\InstallActions\DB\Payment\PaymentsTable; | |
| 19 | +use IvyForms\Services\InstallActions\Migrations\PaymentSchemaMigrations; | |
| 20 | +use IvyForms\Services\InstallActions\Migrations\AddRowColumnLayoutToFields; | |
| 21 | +use IvyForms\Services\InstallActions\Migrations\SeedRowIndexForFields; | |
| 22 | +use IvyForms\Services\InstallActions\Migrations\AddReplyToToNotifications; | |
| 23 | +use IvyForms\Services\InstallActions\Migrations\AddStyleSettingsToForms; | |
| 24 | +use IvyForms\Services\InstallActions\Migrations\AddShowEmptyFieldsToNotifications; | |
| 25 | +use IvyForms\Services\InstallActions\Migrations\AddFormTypeToForms; | |
| 26 | +use IvyForms\Services\InstallActions\Migrations\ConvertNotificationSmartLogicToText; | |
| 27 | +use IvyForms\Services\InstallActions\Migrations\AddPageIdToFields; | |
| 28 | +use IvyForms\Services\InstallActions\Migrations\AddNamePositionToConfirmations; | |
| 29 | +use IvyForms\Services\InstallActions\Migrations\AddCcBccToNotifications; | |
| 30 | +use IvyForms\Services\InstallActions\Migrations\ExpandReceiverColumnInNotifications; | |
| 31 | + | |
| 32 | +/** | |
| 33 | + * Class ActivationHook | |
| 34 | + * | |
| 35 | + * @package IvyForms\Services\InstallActions | |
| 36 | + */ | |
| 37 | +class ActivationDatabaseHook | |
| 38 | +{ | |
| 39 | + /** | |
| 40 | + * Initialize the plugin | |
| 41 | + */ | |
| 42 | + public static function init(): void | |
| 43 | + { | |
| 44 | + FormsTable::init(); | |
| 45 | + FieldsTable::init(); | |
| 46 | + NotificationsTable::init(); | |
| 47 | + ConfirmationsTable::init(); | |
| 48 | + EntriesTable::init(); | |
| 49 | + EntryFieldsTable::init(); | |
| 50 | + FieldOptionsTable::init(); | |
| 51 | + GoogleSheetsTable::init(); | |
| 52 | + PaymentsTable::init(); | |
| 53 | + OrdersTable::init(); | |
| 54 | + | |
| 55 | + // Run migrations | |
| 56 | + AddRowColumnLayoutToFields::run(); | |
| 57 | + SeedRowIndexForFields::run(); | |
| 58 | + AddReplyToToNotifications::run(); | |
| 59 | + AddStyleSettingsToForms::run(); | |
| 60 | + AddShowEmptyFieldsToNotifications::run(); | |
| 61 | + AddFormTypeToForms::run(); | |
| 62 | + PaymentSchemaMigrations::run(); | |
| 63 | + ConvertNotificationSmartLogicToText::run(); | |
| 64 | + AddPageIdToFields::run(); | |
| 65 | + AddNamePositionToConfirmations::run(); | |
| 66 | + AddCcBccToNotifications::run(); | |
| 67 | + ExpandReceiverColumnInNotifications::run(); | |
| 68 | + } | |
| 69 | +} | |