DB
2 weeks ago
ActivationDatabaseHook.php
6 months ago
ActivationMultisite.php
1 year ago
ActivationNewSiteMultisite.php
1 month ago
ActivationRolesHook.php
1 year ago
ActivationSettingsHook.php
2 weeks ago
AutoUpdateHook.php
1 month ago
DeleteDatabaseHook.php
1 year ago
DeletionMultisite.php
1 year ago
DeleteDatabaseHook.php
200 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Database hook for activation |
| 5 | */ |
| 6 | |
| 7 | namespace AmeliaBooking\Infrastructure\WP\InstallActions; |
| 8 | |
| 9 | use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException; |
| 10 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\PackagesCustomersServicesTable; |
| 11 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\PackagesCustomersTable; |
| 12 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\PackagesServicesLocationsTable; |
| 13 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\PackagesServicesProvidersTable; |
| 14 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\PackagesServicesTable; |
| 15 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\PackagesTable; |
| 16 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\ResourcesTable; |
| 17 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\ResourcesToEntitiesTable; |
| 18 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\ServicesTable; |
| 19 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\CategoriesTable; |
| 20 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\ExtrasTable; |
| 21 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Bookable\ServicesViewsTable; |
| 22 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\AppointmentsTable; |
| 23 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\CustomerBookingsTable; |
| 24 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\CustomerBookingsToEventsPeriodsTable; |
| 25 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\CustomerBookingsToExtrasTable; |
| 26 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\CustomerBookingToEventsTicketsTable; |
| 27 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\EventsPeriodsTable; |
| 28 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\EventsProvidersTable; |
| 29 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\EventsTable; |
| 30 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\EventsTagsTable; |
| 31 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Booking\EventsTicketsTable; |
| 32 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Cache\CacheTable; |
| 33 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Coupon\CouponsToEventsTable; |
| 34 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Coupon\CouponsToPackagesTable; |
| 35 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\CustomField\CustomFieldsEventsTable; |
| 36 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\CustomField\CustomFieldsOptionsTable; |
| 37 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\CustomField\CustomFieldsServicesTable; |
| 38 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\CustomField\CustomFieldsTable; |
| 39 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Gallery\GalleriesTable; |
| 40 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Coupon\CouponsTable; |
| 41 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Coupon\CouponsToServicesTable; |
| 42 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Location\LocationsTable; |
| 43 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Location\LocationsViewsTable; |
| 44 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Notification\NotificationsLogTable; |
| 45 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Notification\NotificationsSMSHistoryTable; |
| 46 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Notification\NotificationsTable; |
| 47 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Notification\NotificationsTableInsertRows; |
| 48 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Notification\NotificationsToEntitiesTable; |
| 49 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Payment\PaymentsTable; |
| 50 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Tax\TaxesTable; |
| 51 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\Tax\TaxesToEntitiesTable; |
| 52 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersGoogleCalendarTable; |
| 53 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersLocationTable; |
| 54 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersOutlookCalendarTable; |
| 55 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersPeriodLocationTable; |
| 56 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersPeriodServiceTable; |
| 57 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersPeriodTable; |
| 58 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersSpecialDayPeriodLocationTable; |
| 59 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersSpecialDayPeriodServiceTable; |
| 60 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersSpecialDayPeriodTable; |
| 61 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersSpecialDayTable; |
| 62 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersViewsTable; |
| 63 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\UsersTable; |
| 64 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersServiceTable; |
| 65 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersWeekDayTable; |
| 66 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersTimeOutTable; |
| 67 | use AmeliaBooking\Infrastructure\WP\InstallActions\DB\User\Provider\ProvidersDayOffTable; |
| 68 | |
| 69 | /** |
| 70 | * Class DeleteDatabaseHook |
| 71 | * |
| 72 | * @package AmeliaBooking\Infrastructure\WP\InstallActions |
| 73 | */ |
| 74 | class DeleteDatabaseHook |
| 75 | { |
| 76 | /** |
| 77 | * Delete the plugin tables |
| 78 | * |
| 79 | * @throws InvalidArgumentException |
| 80 | */ |
| 81 | public static function delete() |
| 82 | { |
| 83 | CustomFieldsEventsTable::delete(); |
| 84 | |
| 85 | CustomFieldsServicesTable::delete(); |
| 86 | |
| 87 | CustomFieldsOptionsTable::delete(); |
| 88 | |
| 89 | CustomFieldsTable::delete(); |
| 90 | |
| 91 | NotificationsSMSHistoryTable::delete(); |
| 92 | |
| 93 | NotificationsLogTable::delete(); |
| 94 | |
| 95 | LocationsViewsTable::delete(); |
| 96 | |
| 97 | PaymentsTable::delete(); |
| 98 | |
| 99 | CustomerBookingsToEventsPeriodsTable::delete(); |
| 100 | |
| 101 | CustomerBookingsToExtrasTable::delete(); |
| 102 | |
| 103 | CustomerBookingToEventsTicketsTable::delete(); |
| 104 | |
| 105 | CustomerBookingsTable::delete(); |
| 106 | |
| 107 | CouponsToEventsTable::delete(); |
| 108 | |
| 109 | CouponsToPackagesTable::delete(); |
| 110 | |
| 111 | EventsProvidersTable::delete(); |
| 112 | |
| 113 | EventsPeriodsTable::delete(); |
| 114 | |
| 115 | EventsTagsTable::delete(); |
| 116 | |
| 117 | EventsTicketsTable::delete(); |
| 118 | |
| 119 | EventsTable::delete(); |
| 120 | |
| 121 | AppointmentsTable::delete(); |
| 122 | |
| 123 | ExtrasTable::delete(); |
| 124 | |
| 125 | PackagesTable::delete(); |
| 126 | |
| 127 | PackagesServicesTable::delete(); |
| 128 | |
| 129 | PackagesServicesProvidersTable::delete(); |
| 130 | |
| 131 | PackagesServicesLocationsTable::delete(); |
| 132 | |
| 133 | PackagesCustomersTable::delete(); |
| 134 | |
| 135 | PackagesCustomersServicesTable::delete(); |
| 136 | |
| 137 | ResourcesToEntitiesTable::delete(); |
| 138 | |
| 139 | ResourcesTable::delete(); |
| 140 | |
| 141 | ProvidersServiceTable::delete(); |
| 142 | |
| 143 | CouponsToServicesTable::delete(); |
| 144 | |
| 145 | ServicesViewsTable::delete(); |
| 146 | |
| 147 | ProvidersSpecialDayPeriodServiceTable::delete(); |
| 148 | |
| 149 | ProvidersSpecialDayPeriodLocationTable::delete(); |
| 150 | |
| 151 | ProvidersPeriodServiceTable::delete(); |
| 152 | |
| 153 | ProvidersPeriodLocationTable::delete(); |
| 154 | |
| 155 | ServicesTable::delete(); |
| 156 | |
| 157 | CategoriesTable::delete(); |
| 158 | |
| 159 | ProvidersOutlookCalendarTable::delete(); |
| 160 | |
| 161 | ProvidersGoogleCalendarTable::delete(); |
| 162 | |
| 163 | ProvidersViewsTable::delete(); |
| 164 | |
| 165 | ProvidersSpecialDayPeriodTable::delete(); |
| 166 | |
| 167 | ProvidersPeriodTable::delete(); |
| 168 | |
| 169 | ProvidersTimeOutTable::delete(); |
| 170 | |
| 171 | ProvidersSpecialDayTable::delete(); |
| 172 | |
| 173 | ProvidersWeekDayTable::delete(); |
| 174 | |
| 175 | ProvidersLocationTable::delete(); |
| 176 | |
| 177 | ProvidersDayOffTable::delete(); |
| 178 | |
| 179 | NotificationsTableInsertRows::delete(); |
| 180 | |
| 181 | NotificationsTable::delete(); |
| 182 | |
| 183 | NotificationsToEntitiesTable::delete(); |
| 184 | |
| 185 | LocationsTable::delete(); |
| 186 | |
| 187 | CouponsTable::delete(); |
| 188 | |
| 189 | GalleriesTable::delete(); |
| 190 | |
| 191 | UsersTable::delete(); |
| 192 | |
| 193 | CacheTable::delete(); |
| 194 | |
| 195 | TaxesToEntitiesTable::delete(); |
| 196 | |
| 197 | TaxesTable::delete(); |
| 198 | } |
| 199 | } |
| 200 |