diff --git a/.vscode/settings.json b/.vscode/settings.json index 9aa1d931..66a8c984 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,5 +20,6 @@ "titleBar.inactiveBackground": "#0f437e99", "titleBar.inactiveForeground": "#e7e7e799" }, - "peacock.remoteColor": "#0f437e" + "peacock.remoteColor": "#0f437e", + "intelephense.environment.phpVersion": "8.3.0" } diff --git a/app/Http/Controllers/Club/ShopController.php b/app/Http/Controllers/Club/ShopController.php index 9adc5f92..6cde32eb 100644 --- a/app/Http/Controllers/Club/ShopController.php +++ b/app/Http/Controllers/Club/ShopController.php @@ -25,6 +25,11 @@ use Illuminate\Support\Facades\Log; class ShopController extends Controller { + public function __construct( + private readonly AxeptaPayment $aPayment + ) { + return parent::__construct(); + } /** * Shop index. * @@ -192,13 +197,6 @@ class ShopController extends Controller // * Convert total in cents $totalToPay = (int) (\number_format((float) $totalToPay, 2)) * 100; - $aPayment = new AxeptaPayment( - config('axepta.endpoint'), - config('axepta.merchantId'), - config('axepta.apiKey'), - config('axepta.hmac') - ); - $aOrder = new AxeptaOrder( $order->ref, $totalToPay, @@ -206,7 +204,7 @@ class ShopController extends Controller ); try { - $payment = $aPayment->getCheckoutUrl( + $payment = $this->aPayment->getCheckoutUrl( $aOrder, route('club.shop.reglement.payementConfirmCB', $order), route('club.shop.reglement.payementConfirmCB', ['order' => $order, 'cancel' => true]), @@ -229,8 +227,8 @@ class ShopController extends Controller $e->getMessage() )); return view('club.pages.shop.info') - ->with('title', trans('Commande annulée')) - ->with('message', trans("Le paiement n'a pu aboutir. Veuillez réessayer")); + ->with('title', trans('Commande annulée')) + ->with('message', trans("Le paiement n'a pu aboutir. Veuillez réessayer")); } //end try } @@ -250,21 +248,14 @@ class ShopController extends Controller ): \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory { // phpcs:enable try { - $aPayment = new AxeptaPayment( - config('axepta.endpoint'), - config('axepta.merchantId'), - config('axepta.apiKey'), - config('axepta.hmac') - ); - - if (!$aPayment->isValidWebhookAccess($request)) { + if (!$this->aPayment->isValidWebhookAccess($request)) { $order->status = OrderStatus::failed; $order->save(); // @phpstan-ignore finally.exitPoint throw new CBPayementError('Data were altered from response'); } - $response = $aPayment->getPaymentStatusById($request->payId); + $response = $this->aPayment->getPaymentStatusById($request->payId); if (is_null($response)) { if ( @@ -303,10 +294,10 @@ class ShopController extends Controller } break; default: - // * ERROR + // * ERROR if ( - !$order->confirmMailSent and - !$order->status->equals(OrderStatus::payed) + !$order->confirmMailSent and + !$order->status->equals(OrderStatus::payed) ) { $order->status = OrderStatus::failed; $order->save(); @@ -357,14 +348,7 @@ class ShopController extends Controller return view('club.pages.shop.validated'); } - $aPayment = new AxeptaPayment( - config('axepta.endpoint'), - config('axepta.merchantId'), - config('axepta.apiKey'), - config('axepta.hmac') - ); - - $response = $aPayment->getPaymentStatusById($request->PayID); + $response = $this->aPayment->getPaymentStatusById($request->PayID); if (is_null($response)) { return view('club.pages.shop.info') diff --git a/app/Lib/Axepta/AxeptaPayment.php b/app/Lib/Axepta/AxeptaPayment.php index dfa87236..8b7b8f87 100644 --- a/app/Lib/Axepta/AxeptaPayment.php +++ b/app/Lib/Axepta/AxeptaPayment.php @@ -4,13 +4,21 @@ namespace App\Lib\Axepta; use App\Lib\Axepta\Objects\AxeptaOrder; use Carbon\Carbon; +use Carbon\CarbonInterface; use GuzzleHttp\Client; use GuzzleHttp\Exception\RequestException; +use Illuminate\Http\Request; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Str; +use Psr\Log\LoggerInterface; class AxeptaPayment { + private const int PERMITTED_TIMESTAMP_SKEW_IN_MINUTES = 5; + + private const string USING_API_VERSION = 'v1'; + /** * Guzzle Client instance * @@ -42,8 +50,19 @@ class AxeptaPayment * @param array $axeptaConfig Additionnal or Update Axepta configuration * @return void */ - public function __construct(private string $endpoint, private string $merchantId, private string $apiKey, private string $hmac, private array $axeptaConfig = []) - { + public function __construct( + private readonly LoggerInterface $logger, + #[\SensitiveParameter] + private string $endpoint, + #[\SensitiveParameter] + private string $merchantId, + #[\SensitiveParameter] + private string $apiKey, + #[\SensitiveParameter] + private string $hmac, + #[\SensitiveParameter] + private array $axeptaConfig = [] + ) { $this->endpoint = $endpoint; $this->merchantId = $merchantId; $this->apiKey = $apiKey; @@ -114,7 +133,7 @@ class AxeptaPayment $errorData = json_decode($errorBody, true); $message = $errorData['error'] ?? $errorData['responseDescription'] ?? $e->getMessage(); throw new \RuntimeException("Axepta token error: {$message}", 0, $e); - }//end try + } //end try } /** @@ -141,7 +160,7 @@ class AxeptaPayment "order" => [ "merchantReference" => $order->reference, "creationDate" => gmdate('c'), -// ISO 8601 now + // ISO 8601 now ], "customerInfo" => [ "email" => $order->customerEmail, @@ -159,7 +178,7 @@ class AxeptaPayment 'Idempotency-Key' => (string) Str::uuid() ], 'json' => array_merge_recursive($payload, $this->axeptaCheckoutConfig) -// Automatically JSON encodes and sets Content-Type + // Automatically JSON encodes and sets Content-Type ]); if ($response->getStatusCode() !== 202) { @@ -175,7 +194,7 @@ class AxeptaPayment return $responseBody->_links->redirect->href; } catch (RequestException $e) { throw new \RuntimeException("Payment session error: " . $e->getMessage(), 0, $e); - }//end try + } //end try } /** @@ -224,62 +243,7 @@ class AxeptaPayment } else { return null; } - }//end try - } - - /** - * Check signature version - * - * https://axepta.computop.com/display/DOCBNP/Gestion+des+callbacks+et+notification+de+paiement - * - * @param string|null $version - * @return boolean - */ - private function isValidSignatureVersion(?string $version): bool - { - return $version === 'v1'; - } - - /** - * Check signature - * - * https://axepta.computop.com/display/DOCBNP/Gestion+des+callbacks+et+notification+de+paiement - * - * @param string $signature - * @param string $timestamp - * @param string $rawPayload - * @return boolean - */ - private function isValidSignature(string $signature, string $timestamp, string $rawPayload): bool - { - $providedSignature = $this->extractSignature($signature); - if (!$providedSignature) { - return false; - } - - $signedPayload = "{$timestamp}.{$rawPayload}"; - $expectedSignature = hash_hmac('sha256', $signedPayload, $this->hmac); - - return hash_equals($expectedSignature, $providedSignature); - } - - /** - * Extract the hex value after "v1=" from the signature header. - * - * https://axepta.computop.com/display/DOCBNP/Gestion+des+callbacks+et+notification+de+paiement - * - * @param string $signature - * @return string|null - */ - private function extractSignature(string $signature): ?string - { - if (!str_starts_with($signature, 'v1=')) { - return null; - } - - $hex = substr($signature, 3); - return strlen($hex) === 64 ? $hex : null; -// SHA256 hex = 64 chars + } //end try } /** @@ -295,14 +259,143 @@ class AxeptaPayment * @param \Illuminate\Http\Request $request * @return boolean */ - public function isValidWebhookAccess(\Illuminate\Http\Request $request): bool + public function isValidWebhookAccess(Request $request): bool { - $signatureVersion = $request->header('x-paygate-signature-version'); - $timestamp = $request->header('x-paygate-timestamp', '0'); - $signature = $request->header('x-paygate-signature'); + $signatureVersion = $this->getHeaderValue($request, 'x-paygate-signature-version'); + $signature = $this->getHeaderValue($request, 'x-paygate-signature'); + $timestamp = $this->getHeaderValue($request, 'x-paygate-timestamp'); + $timestamDatetime = Carbon::createFromTimestampUTC($timestamp); + $rawPayload = $request->getContent(false); - return $this->isValidSignatureVersion($signatureVersion) and - Carbon::createFromTimestampUTC($timestamp)->diffInMinutes(Carbon::now('UTC')) <= 5 and - $this->isValidSignature($signature, $timestamp, $request->getContent()); + $this->logger->debug( + 'Received an IPN call', [ + 'request_signature_version' => $signatureVersion, + 'request_signature' => $signature, + 'request_timestamp' => $timestamp, + 'request_payload' => $rawPayload + ] + ); + + return $this->isValidSignatureVersion($signatureVersion) && + $this->requestTimestampIsAcceptable($timestamDatetime) && + $this->isValidSignature($signature, $timestamDatetime, $rawPayload); + } + + /** Get for sure a string value for a specific header name */ + private function getHeaderValue(Request $request, string $headerName): string + { + $headerValue = Arr::wrap($request->header($headerName)); + $headerValue = Arr::map($headerValue, fn($v) => is_scalar($v) ? strval($v) : ''); + + return Str::trim(Arr::join($headerValue, ' ')); + } + + + /** + * Check signature version + * + * https://axepta.computop.com/display/DOCBNP/Gestion+des+callbacks+et+notification+de+paiement + * + * @param string|null $version + * @return boolean + */ + private function isValidSignatureVersion(string $version): bool + { + $versionIsValid = $version === self::USING_API_VERSION; + + if (!$versionIsValid) { + // NOTE: If this occurs it shall be handled + $this->logger->error( + "Version is not accepted", + [ + 'request_version' => $version, + 'accepted_version' => self::USING_API_VERSION + ] + ); + } + return $version === self::USING_API_VERSION; + } + + private function requestTimestampIsAcceptable(CarbonInterface $timestamp): bool + { + $now = Carbon::now('UTC'); + $calculatedDiff = $now->diffInMinutes(date: $timestamp, absolute: true); + $timestampIsInSkew = $calculatedDiff <= self::PERMITTED_TIMESTAMP_SKEW_IN_MINUTES; + + if (!$timestampIsInSkew) { + // NOTE: If this occurs it shall be handled + $this->logger->error( + "request timestamp skew is not not matched", + [ + 'request_timestamp' => $timestamp, + 'diff' => $calculatedDiff, + 'max_skew_in_minutes' => self::PERMITTED_TIMESTAMP_SKEW_IN_MINUTES + ] + ); + } + + return $timestampIsInSkew; + } + + /** + * Check signature + * + * https://axepta.computop.com/display/DOCBNP/Gestion+des+callbacks+et+notification+de+paiement + * + * @param string $signature + * @param \Carbon\CarbonInterface $timestamp + * @param string $rawPayload + * @return boolean + */ + private function isValidSignature(string $signature, CarbonInterface $timestamp, string $rawPayload): bool + { + $providedSignature = $this->extractSignatureFromCurrentVersion($signature); + + if (!$providedSignature) { + // NOTE: If this occurs it shall be handled + $this->logger->error( + "Could not extract signature from '{$signature}'" + ); + return false; + } + + $signedPayload = "{$timestamp}.{$rawPayload}"; + $expectedSignature = hash_hmac('sha256', $signedPayload, $this->hmac); + $signatureIsValid = hash_equals($expectedSignature, $providedSignature); + + if (!$signatureIsValid) { + // NOTE: If this occurs it could be a fraudulent request + $this->logger->debug( + "{Could not validate that expected signature '{$expectedSignature}' matches the request signature '{$signature}'", + [ + 'request_signature' => $signature, + 'request_timestamp' => $timestamp, + 'request_payload' => $rawPayload, + ] + ); + } + + return $signatureIsValid; + } + + /** + * Extract the hex value after "v1=" from the signature header. + * + * https://axepta.computop.com/display/DOCBNP/Gestion+des+callbacks+et+notification+de+paiement + * + * @param string $signature + * @return string|null + */ + private function extractSignatureFromCurrentVersion(string $signature): ?string + { + $signatures = explode(',', $signature); + $filteredSignatures = array_filter($signatures, function (string $key) { + return $key === self::USING_API_VERSION; + }, \ARRAY_FILTER_USE_KEY); + + $hex = $filteredSignatures[0] ?? ''; + + // NOTE: SHA256 hex = 64 chars + return strlen($hex) === 64 ? $hex : null; } } diff --git a/app/Lib/Link.php b/app/Lib/Link.php index 347557a7..5a9bc27a 100644 --- a/app/Lib/Link.php +++ b/app/Lib/Link.php @@ -60,7 +60,14 @@ class Link implements Jsonable, Arrayable, Stringable */ public function getUrl(): string { - return !is_null($this->url) ? $this->url : route($this->getRouteName()); + $url = $this->url; + + if (!is_null($url)) { + return $url; + } + + $routeName = $this->getRouteName(); + return $routeName ? route($routeName) : route('fo.home.show'); } /** diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index b9d862ec..6013557a 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use App\Enums\Settings\SettingsType; +use App\Lib\Axepta\AxeptaPayment; use App\Models\GeneralSetting; use App\Models\MenuNodeData; use App\Providers\TelescopeServiceProvider as CustomTelescopeServiceProvider; @@ -12,10 +13,12 @@ use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Blade; +use Illuminate\Support\Facades\Config; use Laravel\Telescope\TelescopeServiceProvider; use Money\Currencies\ISOCurrencies; use Money\Currency; use Money\Formatter\IntlMoneyFormatter; +use Psr\Log\LoggerInterface; use Snipe\BanBuilder\CensorWords; class AppServiceProvider extends ServiceProvider @@ -57,6 +60,18 @@ class AppServiceProvider extends ServiceProvider // * Censor App::singleton('censor', fn() => new CensorWords()); + // * Axepta + $this->app->singleton(AxeptaPayment::class, function () { + $logger = resolve(LoggerInterface::class); + return new AxeptaPayment( + $logger, + Config::string('axepta.endpoint'), + Config::string('axepta.merchantId'), + Config::string('axepta.apiKey'), + Config::string('axepta.hmac') + ); + }); + $this->setPaymentCurrency(); // * BLADE DIRECTIVES diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index fd91d629..00000000 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('first_name')->comment('First name of the user.'); - $table->string('last_name')->comment('Last name of the user.'); - $table->string('email')->unique()->comment('Email of the user.'); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password')->comment('Password of the user account.'); - $table->rememberToken(); - $table->unsignedTinyInteger('role')->comment('Role of the user who defines the rights/access.'); - $table->boolean('published')->comment('The user is acivated or not.'); - $table->timestamp('published_at')->nullable()->comment('The date on which the user was activated.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('users'); - } -}; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php deleted file mode 100644 index b4d45de2..00000000 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('password_resets'); - } -}; diff --git a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php deleted file mode 100644 index 700a83f0..00000000 --- a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php +++ /dev/null @@ -1,70 +0,0 @@ -getConnection()); - - $schema->create('telescope_entries', function (Blueprint $table) { - $table->bigIncrements('sequence'); - $table->uuid('uuid'); - $table->uuid('batch_id'); - $table->string('family_hash')->nullable(); - $table->boolean('should_display_on_index')->default(true); - $table->string('type', 20); - $table->longText('content'); - $table->dateTime('created_at')->nullable(); - - $table->unique('uuid'); - $table->index('batch_id'); - $table->index('family_hash'); - $table->index('created_at'); - $table->index(['type', 'should_display_on_index']); - }); - - $schema->create('telescope_entries_tags', function (Blueprint $table) { - $table->uuid('entry_uuid'); - $table->string('tag'); - - $table->primary(['entry_uuid', 'tag']); - $table->index('tag'); - - $table->foreign('entry_uuid') - ->references('uuid') - ->on('telescope_entries') - ->onDelete('cascade'); - }); - - $schema->create('telescope_monitoring', function (Blueprint $table) { - $table->string('tag')->primary(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - $schema = Schema::connection($this->getConnection()); - - $schema->dropIfExists('telescope_entries_tags'); - $schema->dropIfExists('telescope_entries'); - $schema->dropIfExists('telescope_monitoring'); - } -}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php deleted file mode 100644 index db96e7df..00000000 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ /dev/null @@ -1,36 +0,0 @@ -id(); - $table->string('uuid')->unique(); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('failed_jobs'); - } -}; diff --git a/database/migrations/2021_11_19_102529_create_jobs_table.php b/database/migrations/2021_11_19_102529_create_jobs_table.php deleted file mode 100644 index 560ae54b..00000000 --- a/database/migrations/2021_11_19_102529_create_jobs_table.php +++ /dev/null @@ -1,36 +0,0 @@ -bigIncrements('id'); - $table->string('queue')->index(); - $table->longText('payload'); - $table->unsignedTinyInteger('attempts'); - $table->unsignedInteger('reserved_at')->nullable(); - $table->unsignedInteger('available_at'); - $table->unsignedInteger('created_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('jobs'); - } -}; diff --git a/database/migrations/2023_09_08_102717_create_actitivy_logs_table.php b/database/migrations/2023_09_08_102717_create_actitivy_logs_table.php deleted file mode 100644 index 0d9489c0..00000000 --- a/database/migrations/2023_09_08_102717_create_actitivy_logs_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->foreignId('user_id')->nullable() - ->comment('Id of the user associated, or nullable for a deleted user.') - ->constrained('users')->nullOnDelete(); - $table->boolean('is_anonymous')->comment('If there is no user connected when action was realised.'); - $table->boolean('is_console')->comment('If the action was realised in console.'); - $table->string('model_class')->comment('Target model.'); - $table->integer('model_id')->comment('Id of the target model.'); - $table->integer('event')->comment('Event of this activity (ActivityLogsEventEnum).'); - $table->json('data')->nullable()->comment('List of changes (old and new values).'); - $table->timestamp('created_at')->comment('The date on which the user was published.'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('activity_logs'); - } -}; diff --git a/database/migrations/2023_10_19_094711_create_static_pages.php b/database/migrations/2023_10_19_094711_create_static_pages.php deleted file mode 100644 index 78fda281..00000000 --- a/database/migrations/2023_10_19_094711_create_static_pages.php +++ /dev/null @@ -1,37 +0,0 @@ -id(); - $table->unsignedTinyInteger('type')->unique()->comment('Page type (StaticPageEnum)'); - $table->string('seo_title')->comment('Seo title about 70 chars as recommended'); - $table->string('seo_description')->comment('Seo description about 160 chars as recommended'); - $table->string('title')->comment('Title for the page'); - $table->string('slug')->unique()->comment('Unique title slug'); - $table->text('content')->comment('WYSIWYG text content using ckeditor'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('static_pages'); - } -}; diff --git a/database/migrations/2024_03_27_163722_create_brand_advantages_table.php b/database/migrations/2024_03_27_163722_create_brand_advantages_table.php deleted file mode 100644 index 6ea69d92..00000000 --- a/database/migrations/2024_03_27_163722_create_brand_advantages_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('title')->comment('Brand advantage title'); - $table->string('sustitle')->nullable()->comment('Brand advantage sustitle'); - $table->string('picto')->comment('Brand advantage pictogram'); - $table->string('picto_alt')->comment('Pictogram alt attribute'); - $table->string('picto_title')->comment('Pictogram title attribute'); - $table->string('text')->nullable()->comment('Brand advantage text'); - $table->boolean('is_large')->comment('Brand advantage block width'); - $table->integer('order')->comment('Brand advantage order'); - $table->boolean('published')->comment('Brand advantage publish status'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('brand_advantages'); - } -}; diff --git a/database/migrations/2024_03_27_165252_create_professions_table.php b/database/migrations/2024_03_27_165252_create_professions_table.php deleted file mode 100644 index d730c1bb..00000000 --- a/database/migrations/2024_03_27_165252_create_professions_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('title')->comment('Profession title.'); - $table->string('picture')->comment('Profession picture.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->text('jobs_list')->comment('Profession list of jobs.'); - $table->string('job_url', 300)->comment('Digital recruiters url.'); - $table->boolean('published')->comment('Profession publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('professions'); - } -}; diff --git a/database/migrations/2024_03_29_092817_create_key_numbers_table.php b/database/migrations/2024_03_29_092817_create_key_numbers_table.php deleted file mode 100644 index bb9b5bef..00000000 --- a/database/migrations/2024_03_29_092817_create_key_numbers_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('picto')->comment('Picto path.'); - $table->string('picto_alt')->comment('Picto alt attribute.'); - $table->string('picto_title')->comment('Picto title attribute.'); - $table->string('text')->comment('Picto legend.'); - $table->string('source')->comment('Text origin.'); - $table->integer('order')->comment('Display order bo.'); - $table->boolean('published')->comment('Picto publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('key_numbers'); - } -}; diff --git a/database/migrations/2024_04_04_115045_create_demarche_slides_table.php b/database/migrations/2024_04_04_115045_create_demarche_slides_table.php deleted file mode 100644 index d49dc5cf..00000000 --- a/database/migrations/2024_04_04_115045_create_demarche_slides_table.php +++ /dev/null @@ -1,49 +0,0 @@ -id(); - $table->string('title')->comment('Slide title.'); - $table->string('picture')->comment('Slide picture.'); - $table->string('picture_alt')->comment('Slide picture alt attribute.'); - $table->string('picture_title')->comment('Slide picture title attribute.'); - $table->string('button_1_text')->nullable()->comment('Slide button n°1 text.'); - $table->string('button_1_url')->nullable()->comment('Slide button n°1 url.'); - $table->string('button_2_text')->nullable()->comment('Slide button n°2 text.'); - $table->string('button_2_url')->nullable()->comment('Slide button n°2 url.'); - $table->text('text')->comment('Slide text content.'); - $table->integer('order')->comment('Slide order.'); - #FIXME: add demarche relation - $table->boolean('button_1_status')->comment('Slide button n°1 publish status.'); - $table->boolean('button_1_target')->comment('Slide button n°1 target.'); - $table->boolean('button_2_status')->comment('Slide button n°2 publish status.'); - $table->boolean('button_2_target')->comment('Slide button n°2 target.'); - $table->boolean('published')->comment('Slide publish status.'); - $table->timestamp('publish_at')->nullable()->comment('Slide publishment date.'); - $table->timestamp('unpublish_at')->nullable()->comment('Slide unpublishment date.'); - $table->timestamps(); - }); - } - - /** - * Run the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('demarche_slides'); - } -}; diff --git a/database/migrations/2024_04_08_100253_create_general_settings_table.php b/database/migrations/2024_04_08_100253_create_general_settings_table.php deleted file mode 100644 index e948c8cb..00000000 --- a/database/migrations/2024_04_08_100253_create_general_settings_table.php +++ /dev/null @@ -1,32 +0,0 @@ -unsignedTinyInteger('type')->unique()->comment('General settings enum type (SettingsType).'); - $table->json('value')->comment('General settings value (json).'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('general_settings'); - } -}; diff --git a/database/migrations/2024_04_11_093924_create_menu_node_data_table.php b/database/migrations/2024_04_11_093924_create_menu_node_data_table.php deleted file mode 100644 index 9bc8f82d..00000000 --- a/database/migrations/2024_04_11_093924_create_menu_node_data_table.php +++ /dev/null @@ -1,47 +0,0 @@ -unsignedSmallInteger('type') - ->comment('Enum MenuNodeType, this is unique since we do not use this for links.'); - $table->string('sub_label')->comment('(Left part) Link label'); - $table->string('title')->comment('(Right part) Sub title'); - $table->string('text')->comment('(Right part) Sub text'); - $table->unsignedBigInteger('text_color')->comment('(Right part) Sub text color'); - $table->string('link_url')->comment('(Right part) Link url'); - $table->string('link_title')->comment('(Right part) Link title'); - $table->boolean('link_target')->comment('(Right part) Link target'); - $table->boolean('link_status')->comment('(Right part) Link status'); - $table->string('picture')->comment('(Right part) Picture'); - $table->string('picture_alt')->comment('(Right part) Picture alt text'); - $table->string('picture_title')->comment('(Right part) Picture title text'); - $table->boolean('picture_status')->comment('(Right part) Picture status'); - $table->string('background_picture')->comment('(Right part) Menu picture'); - $table->string('background_picture_alt')->comment('(Right part) Menu picture alt text'); - $table->string('background_picture_title')->comment('(Right part) Menu picture title text'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('menu_node_data'); - } -}; diff --git a/database/migrations/2024_04_11_155435_create_ranges_table.php b/database/migrations/2024_04_11_155435_create_ranges_table.php deleted file mode 100644 index af2d38d7..00000000 --- a/database/migrations/2024_04_11_155435_create_ranges_table.php +++ /dev/null @@ -1,43 +0,0 @@ -id(); - $table->string('label')->comment('Range label.'); - $table->string('slug')->comment('Range slug.'); - $table->text('description')->comment('Range description.'); - $table->string('banner')->comment('Range banner'); - $table->string('banner_alt')->comment('Banner alt attribute'); - $table->string('banner_title')->comment('Banner title attribute'); - $table->string('banner_ambiance')->comment('Range ambiance banner'); - $table->string('banner_ambiance_alt')->comment('Ambiance banner alt attribute'); - $table->string('banner_ambiance_title')->comment('Ambiance banner title attribute'); - $table->unsignedBigInteger('color')->comment('Range associated color.'); - $table->integer('order')->comment('Range order'); - $table->boolean('published')->comment('Range publish status'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('ranges'); - } -}; diff --git a/database/migrations/2024_04_11_161238_create_subranges_table.php b/database/migrations/2024_04_11_161238_create_subranges_table.php deleted file mode 100644 index f5ff0bfc..00000000 --- a/database/migrations/2024_04_11_161238_create_subranges_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('label')->comment('Subrange label.'); - $table->string('slug')->comment('Subrange slug.'); - $table->text('description')->comment('Subrange description.'); - $table->foreignId('range_id')->comment('Associated range')->constrained() - ->onUpdate('no action')->onDelete('restrict'); - $table->integer('order')->comment('Subrange order'); - $table->boolean('published')->comment('Subrange publish status'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('subranges'); - } -}; diff --git a/database/migrations/2024_04_11_162113_create_meats_table.php b/database/migrations/2024_04_11_162113_create_meats_table.php deleted file mode 100644 index d3e76fbf..00000000 --- a/database/migrations/2024_04_11_162113_create_meats_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('label')->comment('Meat label.'); - $table->string('slug')->comment('Meat slug.'); - $table->text('description')->comment('Meat description.'); - $table->string('banner')->comment('Meat banner'); - $table->string('banner_alt')->comment('Banner alt attribute.'); - $table->string('banner_title')->comment('Banner title attribute.'); - $table->unsignedBigInteger('color')->comment('Meat associated color.'); - $table->integer('order')->comment('Meat order.'); - $table->boolean('published')->comment('Meat publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('meats'); - } -}; diff --git a/database/migrations/2024_04_11_162347_create_submeats_table.php b/database/migrations/2024_04_11_162347_create_submeats_table.php deleted file mode 100644 index 03a568bc..00000000 --- a/database/migrations/2024_04_11_162347_create_submeats_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('label')->comment('Submeat label.'); - $table->string('slug')->comment('Submeat slug.'); - $table->text('description')->comment('Submeat description.'); - $table->foreignId('meat_id')->comment('Associated meat')->constrained() - ->onUpdate('no action')->onDelete('restrict'); - $table->integer('order')->comment('Submeat order'); - $table->boolean('published')->comment('Submeat publish status'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('submeats'); - } -}; diff --git a/database/migrations/2024_04_12_084956_create_approaches_table.php b/database/migrations/2024_04_12_084956_create_approaches_table.php deleted file mode 100644 index e18cf9a1..00000000 --- a/database/migrations/2024_04_12_084956_create_approaches_table.php +++ /dev/null @@ -1,37 +0,0 @@ -id(); - $table->unsignedTinyInteger('type')->comment('Approach type (label or demarche).'); - $table->string('name')->comment('Approach name.'); - $table->string('picture')->comment('Approach picture.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->boolean('published')->comment('Approach publication status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('approaches'); - } -}; diff --git a/database/migrations/2024_04_12_094030_create_products_table.php b/database/migrations/2024_04_12_094030_create_products_table.php deleted file mode 100644 index db789ba0..00000000 --- a/database/migrations/2024_04_12_094030_create_products_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->string('label')->comment('Product label.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('products'); - } -}; diff --git a/database/migrations/2024_04_12_095316_create_productables_table.php b/database/migrations/2024_04_12_095316_create_productables_table.php deleted file mode 100644 index 822d126c..00000000 --- a/database/migrations/2024_04_12_095316_create_productables_table.php +++ /dev/null @@ -1,32 +0,0 @@ -foreignId('product_id')->comment('The product to associate')->constrained() - ->onUpdate('no action')->onDelete('cascade'); - $table->morphs('productable'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('productables'); - } -}; diff --git a/database/migrations/2024_04_13_115045_create_main_slides_table.php b/database/migrations/2024_04_13_115045_create_main_slides_table.php deleted file mode 100644 index a589709e..00000000 --- a/database/migrations/2024_04_13_115045_create_main_slides_table.php +++ /dev/null @@ -1,61 +0,0 @@ -id(); - $table->string('title')->comment('Slide title.'); - $table->string('subtitle')->comment('Slide subtitle.'); - $table->string('background')->comment('Slide background.'); - $table->string('background_alt')->comment('Background alt attribute.'); - $table->string('background_title')->comment('Background title attribute.'); - $table->string('picture')->nullable()->comment('Slide picture.'); - $table->string('picture_alt')->nullable()->comment('Picture alt attribute.'); - $table->string('picture_title')->nullable()->comment('Picture title attribute.'); - $table->string('button_1_text')->nullable()->comment('Slide button n°1 text.'); - $table->string('button_1_url')->nullable()->comment('Slide button n°1 url.'); - $table->string('button_2_text')->nullable()->comment('Text of the button n°2 in the slide.'); - $table->string('button_2_url')->nullable()->comment('Url of the button n°2 in the slide.'); - $table->foreignId('approach_id')->nullable()->constrained('approaches') - ->onUpdate('cascade')->onDelete('cascade'); - $table->unsignedBigInteger('color_block')->comment('Slide block background color.'); - $table->unsignedBigInteger('button_1_color_text')->comment('Slide button n°1 text color.'); - $table->unsignedBigInteger('button_1_color_background') - ->comment('Slide button n°1 background color.'); - $table->unsignedBigInteger('button_2_color_text')->comment('Slide button n°2 text color.'); - $table->unsignedBigInteger('button_2_color_background') - ->comment('Slide button n°2 background color.'); - $table->integer('order')->comment('Slide order.'); - $table->boolean('button_1_status')->comment('Slide button n°1 publish status.'); - $table->boolean('button_1_target')->comment('Slide button n°1 target.'); - $table->boolean('button_2_status')->comment('Slide button n°2 publish status.'); - $table->boolean('button_2_target')->comment('Open the url of the button n°2 in a new tab.'); - $table->boolean('new')->comment('Slide picto new.'); - $table->boolean('published')->comment('Slide publish status.'); - $table->timestamp('publish_at')->nullable()->comment('Slide publishment date.'); - $table->timestamp('unpublish_at')->nullable()->comment('Slide unpublishment date.'); - $table->timestamps(); - }); - } - - /** - * Run the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('main_slides'); - } -}; diff --git a/database/migrations/2024_04_25_151849_create_consumption_moments_table.php b/database/migrations/2024_04_25_151849_create_consumption_moments_table.php deleted file mode 100644 index 30bf096c..00000000 --- a/database/migrations/2024_04_25_151849_create_consumption_moments_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('title')->comment('The title of the consumption moment.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('consumption_moment'); - } -}; diff --git a/database/migrations/2024_04_29_164213_create_video_table.php b/database/migrations/2024_04_29_164213_create_video_table.php deleted file mode 100644 index 6da0ba0d..00000000 --- a/database/migrations/2024_04_29_164213_create_video_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('title')->comment('Video title.'); - $table->string('video_id')->comment('The video ID.'); - $table->boolean('is_on_homepage')->comment('Is display on homepage ?'); - $table->foreignId('product_id')->nullable()->comment('Associated product')->constrained() - ->onUpdate('no action')->onDelete('cascade'); - $table->integer('order')->comment('Video order.'); - $table->boolean('published')->comment('Video publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('video'); - } -}; diff --git a/database/migrations/2024_04_29_171346_create_recipes_table.php b/database/migrations/2024_04_29_171346_create_recipes_table.php deleted file mode 100644 index 67cfd9da..00000000 --- a/database/migrations/2024_04_29_171346_create_recipes_table.php +++ /dev/null @@ -1,51 +0,0 @@ -id(); - $table->string('slug')->comment('Recipe slug.'); - $table->string('title')->comment('Recipe title.'); - $table->string('tips')->comment('Recipe tips.'); - $table->string('picture')->comment('Recipe picture.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->json('ingredients_list')->comment('Recipe list of ingredients.'); - $table->text('preparation')->comment('Recipe preparation.'); - $table->text('advice')->comment('Recipe advice.'); - $table->foreignId('video_id')->nullable()->comment('Recipe video.')->constrained() - ->onUpdate('no action')->onDelete('restrict'); - $table->foreignId('consumption_moment_id')->comment('Recipe consumption moment.')->constrained() - ->onUpdate('no action')->onDelete('restrict'); - $table->unsignedSmallInteger('preparation_time')->comment('Recipe preparation time.'); - $table->unsignedSmallInteger('cooking_time')->comment('Recipe cooking time.'); - $table->unsignedSmallInteger('nb_guests') - ->comment('Number of reference persons for ingredient list of the recipe.'); - $table->unsignedTinyInteger('difficulty')->comment('Recipe difficulty.'); - $table->boolean('highlight')->comment('Recipe highlight.'); - $table->boolean('published')->comment('Recipe publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('recipes'); - } -}; diff --git a/database/migrations/2024_05_22_162212_alter_consumption_moment_table.php b/database/migrations/2024_05_22_162212_alter_consumption_moment_table.php deleted file mode 100644 index 18812e5d..00000000 --- a/database/migrations/2024_05_22_162212_alter_consumption_moment_table.php +++ /dev/null @@ -1,39 +0,0 @@ -string('slug')->comment('Consumption moment title slug.')->after('title'); - }); - - ConsumptionMoment::query()->get()->each(function (ConsumptionMoment $consumptionMoment) { - $consumptionMoment->slug = Str::slug($consumptionMoment->title); - $consumptionMoment->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('consumption_moments', function (Blueprint $table) { - $table->dropColumn('slug'); - }); - } -}; diff --git a/database/migrations/2024_05_30_123252_add_picture_to_static_pages_table.php b/database/migrations/2024_05_30_123252_add_picture_to_static_pages_table.php deleted file mode 100644 index 9693bfc5..00000000 --- a/database/migrations/2024_05_30_123252_add_picture_to_static_pages_table.php +++ /dev/null @@ -1,50 +0,0 @@ -string('subtitle')->after('slug')->comment('The static page subtitle.'); - $table->string('picture')->after('subtitle')->comment('Picture path.'); - $table->string('picture_alt')->after('picture')->comment('Picture alt attribute.'); - $table->string('picture_title')->after('picture_alt')->comment('Picture title attribute.'); - }); - - StaticPage::query()->get()->map(function ($satic_page_Model) { - $satic_page_Model->subtitle = fake()->sentence(); - $satic_page_Model->picture = FileStorageHelper::storeFile( - new StaticPage(), - new \SplFileInfo( - \resource_path('../database/factories/assets/recipes/default-picture-720x405.png') - ) - ); - $satic_page_Model->picture_alt = "text alternatif de l'image"; - $satic_page_Model->picture_title = "titre de l'image"; - $satic_page_Model->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('static_pages', function (Blueprint $table) { - $table->dropColumn(['picture', 'picture_alt', 'picture_title', 'subtitle']); - }); - } -}; diff --git a/database/migrations/2024_06_06_161707_create_product_types_table.php b/database/migrations/2024_06_06_161707_create_product_types_table.php deleted file mode 100644 index b93b79f4..00000000 --- a/database/migrations/2024_06_06_161707_create_product_types_table.php +++ /dev/null @@ -1,48 +0,0 @@ -id(); - $table->string('label')->comment('Product type description.'); - $table->text('description')->comment('Product type description.'); - $table->string('picture')->comment('Product type picture.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->boolean('button_status')->comment('Product type button publish status.'); - $table->timestamps(); - }); - - Schema::table('product_types', function (Blueprint $table) { - $table->boolean('published')->comment('Product type publish status.')->after('button_status'); - }); - - // Call seeder. - Artisan::call('db:seed', [ - '--class' => ProductTypeSeeder::class, - ]); - } - - /** - * Run the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('product_types'); - } -}; diff --git a/database/migrations/2024_06_10_122602_create_claims_table.php.php b/database/migrations/2024_06_10_122602_create_claims_table.php.php deleted file mode 100644 index 69171c23..00000000 --- a/database/migrations/2024_06_10_122602_create_claims_table.php.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('label')->comment('Claim label.'); - $table->boolean('published')->comment('Claim publish status.'); - $table->timestamps(); - }); - - // Call seeder. - Artisan::call('db:seed', [ - '--class' => ClaimSeeder::class, - ]); - } - - /** - * Run the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('claims'); - } -}; diff --git a/database/migrations/2024_06_10_141752_alter_products_table.php b/database/migrations/2024_06_10_141752_alter_products_table.php deleted file mode 100644 index 3af378de..00000000 --- a/database/migrations/2024_06_10_141752_alter_products_table.php +++ /dev/null @@ -1,170 +0,0 @@ -string('picture')->after('label')->comment('Product picture.'); - $table->string('picture_alt')->after('picture')->comment('Picture alt attribute.'); - $table->string('picture_title')->after('picture_alt')->comment('Picture title attribute.'); - $table->string('banner')->after('picture_title')->comment('Product banner.'); - $table->string('banner_alt')->after('banner')->comment('Banner alt attribute.'); - $table->string('banner_title')->after('banner_alt')->comment('Banner title attribute.'); - $table->string('packaging')->after('banner_title')->comment('Product packaging.'); - $table->string('packaging_alt')->after('packaging')->comment('Packaging alt attribute.'); - $table->string('packaging_title')->after('packaging_alt')->comment('Packaging title attribute.'); - }); - Schema::table('products', function (Blueprint $table) { - $table->text('description')->after('packaging_title')->comment('Product description.'); - $table->text('details')->after('description')->comment('Product details.'); - $table->text('preparation')->after('details')->comment('Product preparation.'); - $table->text('ingredients')->after('preparation')->comment('Product ingrédients.'); - }); - Schema::table('products', function (Blueprint $table) { - $table->foreignId('approach_id')->nullable()->after('ingredients') - ->comment('Product approach (demarche).') - ->constrained()->onUpdate('cascade')->onDelete('cascade'); - $table->boolean('new')->after('approach_id')->nullable()->comment('Product new.'); - $table->boolean('discover')->after('new')->comment('Product discover.'); - $table->boolean('published')->after('discover')->comment('Product publish status.'); - }); - - /** @var \Illuminate\Database\Eloquent\Collection $approachLabels */ - $approachLabels = Approach::query() - ->where('published', true) - ->where('type', ApproachTypeEnum::label) - ->get(); - /** @var \Illuminate\Database\Eloquent\Collection $approachDemarches */ - $approachDemarches = Approach::query() - ->where('type', ApproachTypeEnum::demarche) - ->where('published', true) - ->get(); - /** @var \Illuminate\Database\Eloquent\Collection $productTypeModels */ - $productTypeModels = ProductType::query()->get(); - /** @var \Illuminate\Database\Eloquent\Collection $claimModels */ - $claimModels = Claim::query()->where('published', true)->get(); - - Product::query()->get()->map(function (Product $productModel) use ( - $approachLabels, - $productTypeModels, - $claimModels, - $approachDemarches, - ) { - $productModel->description = "description du produit"; - $productModel->details = "détails du produit"; - $productModel->preparation = "préparation du produit"; - $productModel->ingredients = "ingrédients du produit"; - $productModel->picture = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-1440x420.png' - )) - ); - $productModel->picture_alt = "attribut alt de l'image"; - $productModel->picture_title = "attribut titre de l'image"; - $productModel->banner = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-1440x420.png' - )) - ); - $productModel->banner_alt = "attribut alt de l'image"; - $productModel->banner_title = "attribut titre de l'image"; - $productModel->packaging = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-1440x420.png' - )) - ); - $productModel->packaging_alt = "attribut alt de l'image"; - $productModel->packaging_title = "attribut titre de l'image"; - $productModel->approach_id = rand(0, 1) - ? collect($approachDemarches->random(1))->first()->getKey() - : null; - $productModel->new = rand(0, 1); - $productModel->discover = rand(0, 1); - $productModel->published = rand(0, 1); - $productModel->saveQuietly(); - - // Morph relationships (approach->label). - for ($i = 0; $i <= rand(0, count($approachLabels)); $i++) { - DB::table('productables')->insert( - [ - 'product_id' => $productModel->getKey(), - 'productable_id' => collect($approachLabels->random(1))->first()->getKey(), - 'productable_type' => 'App\Models\Approach' - ] - ); - } - // Morph relationships (productType). - for ($i = 0; $i <= rand(0, count($productTypeModels)); $i++) { - DB::table('productables')->insert( - [ - 'product_id' => $productModel->getKey(), - 'productable_id' => collect($productTypeModels->random(1))->first()->getKey(), - 'productable_type' => 'App\Models\ProductType' - ] - ); - } - // Morph relationships (claim). - for ($i = 0; $i <= rand(0, count($claimModels)); $i++) { - DB::table('productables')->insert( - [ - 'product_id' => $productModel->getKey(), - 'productable_id' => collect($claimModels->random(1))->first()->getKey(), - 'productable_type' => 'App\Models\Claim' - ] - ); - } - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->dropColumn('description'); - $table->dropColumn('details'); - $table->dropColumn('preparation'); - $table->dropColumn('picture'); - $table->dropColumn('picture_alt'); - $table->dropColumn('picture_title'); - $table->dropColumn('banner'); - $table->dropColumn('banner_alt'); - $table->dropColumn('banner_title'); - $table->dropColumn('packaging'); - $table->dropColumn('packaging_alt'); - $table->dropColumn('packaging_title'); - $table->dropForeign(['approach_id']); - $table->dropColumn('approach_id'); - $table->dropColumn('new'); - $table->dropColumn('discover'); - $table->dropColumn('published'); - }); - $arraySQL = ['Approach', 'ProductType', 'Claim']; - foreach ($arraySQL as $value) { - DB::statement('DELETE FROM `productables` WHERE `productable_type` LIKE "%' . $value . '"'); - } - } -}; diff --git a/database/migrations/2024_06_11_112251_add_products_to_general_settings_table.php b/database/migrations/2024_06_11_112251_add_products_to_general_settings_table.php deleted file mode 100644 index 900f8b7c..00000000 --- a/database/migrations/2024_06_11_112251_add_products_to_general_settings_table.php +++ /dev/null @@ -1,38 +0,0 @@ -map(function (SettingsType $enum) { - (new GeneralSetting())->insert([ - 'type' => $enum, - 'value' => json_encode(GeneralSetting::getJsonLayout($enum)), - 'created_at' => now(), - 'updated_at' => now() - ]); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - collect([SettingsType::products, SettingsType::product])->map(function (SettingsType $enum) { - DB::statement('DELETE FROM `general_settings` WHERE `type` LIKE "' . $enum->value() . '"'); - }); - } -}; diff --git a/database/migrations/2024_06_12_103004_create_inco_nutritional_values_table.php b/database/migrations/2024_06_12_103004_create_inco_nutritional_values_table.php deleted file mode 100644 index 62ab9c25..00000000 --- a/database/migrations/2024_06_12_103004_create_inco_nutritional_values_table.php +++ /dev/null @@ -1,58 +0,0 @@ -id()->comment('Inco id.'); - $table->foreignId('product_id')->nullable()->comment('Inco product id.') - ->constrained()->onUpdate('cascade')->onDelete('cascade'); - $table->double('energy')->nullable()->comment('Inco energy value.'); - $table->double('energy_kj')->nullable()->comment('Inco energy (kj) value.'); - $table->double('protein')->nullable()->comment('Inco protein value.'); - $table->double('carbohydrates')->nullable()->comment('Inco carbohydrates value.'); - $table->double('sugar')->nullable()->comment('Inco sugar value.'); - $table->double('fat')->nullable()->comment('Inco fat value.'); - $table->double('saturated_fatty_acids')->nullable()->comment('Inco saturated fatty acids value.'); - $table->double('dietary_fiber')->nullable()->comment('Inco dietary fiber value.'); - $table->double('salt')->nullable()->comment('Inco salt value.'); - $table->float('salt_percent')->nullable()->comment('Inco salt percent.'); - $table->float('energy_percent')->nullable()->comment('Inco energy percent value.'); - $table->float('energy_kj_percent')->nullable()->comment('Inco energy (kj) percent value.'); - $table->float('protein_percent')->nullable()->comment('Inco protein percent value.'); - $table->float('carbohydrates_percent')->nullable()->comment('Inco carbohydrates percent value.'); - $table->float('sugar_percent')->nullable()->comment('Inco salt percent value.'); - $table->float('fat_percent')->nullable()->comment('Inco fat percent value.'); - $table->float('saturated_fatty_acids_percent')->nullable() - ->comment('Inco saturated fatty acids percent value.'); - $table->float('dietary_fiber_percent')->nullable()->comment('Inco dietary fiber percent value.'); - $table->timestamps(); - }); - - Artisan::call('db:seed', [ - '--class' => IncoNutritionalValueSeeder::class, - ]); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('inco_nutritional_values'); - } -}; diff --git a/database/migrations/2024_06_12_122730_clean_database_for_re7.php b/database/migrations/2024_06_12_122730_clean_database_for_re7.php deleted file mode 100644 index 7e3c56a3..00000000 --- a/database/migrations/2024_06_12_122730_clean_database_for_re7.php +++ /dev/null @@ -1,82 +0,0 @@ -map(function (SettingsType $enum) { - (new GeneralSetting())->insert([ - 'type' => $enum, - 'value' => json_encode(GeneralSetting::getJsonLayout($enum)), - 'created_at' => now(), - 'updated_at' => now() - ]); - }); - - // Add sage static page. - (new StaticPage())->insert([ - 'seo_title' => sprintf('Seo title pour la page %s', StaticPageType::saga->label()), - 'seo_description' => sprintf('Seo description pour la page %s', StaticPageType::saga->label()), - 'title' => StaticPageType::saga->label(), - 'type' => StaticPageType::saga, - 'slug' => Str::slug(StaticPageType::saga->label()), - 'subtitle' => fake()->sentence(), - 'picture' => FileStorageHelper::storeFile( - new StaticPage(), - new \SplFileInfo( - \resource_path('../database/factories/assets/recipes/default-picture-720x405.png') - ) - ), - 'picture_alt' => "text alternatif de l'image", - 'picture_title' => "titre de l'image", - 'content' => \clean(\fake()->randomHtml()), - ]); - - Approach::query()->where('type', 1)->get()->map(function (Approach $approachModel) { - $approachModel->type = ApproachTypeEnum::demarche; - $approachModel->saveQuietly(); - }); - Approach::query()->where('type', 0)->get()->map(function (Approach $approachModel) { - $approachModel->type = ApproachTypeEnum::label; - $approachModel->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - collect([SettingsType::recipes, SettingsType::recipe])->map(function (SettingsType $enum) { - DB::statement('DELETE FROM `general_settings` WHERE `type` LIKE "' . $enum->value() . '"'); - }); - DB::statement('DELETE FROM `static_pages` WHERE `type` LIKE "' . StaticPageType::saga->value() . '"'); - Approach::query()->where('type', ApproachTypeEnum::label)->get()->map(function (Approach $approachModel) { - $approachModel->type = 0; - $approachModel->saveQuietly(); - }); - Approach::query()->where('type', ApproachTypeEnum::demarche)->get()->map(function (Approach $approachModel) { - $approachModel->type = 1; - $approachModel->saveQuietly(); - }); - } -}; diff --git a/database/migrations/2024_06_13_101337_alter_images_products_table.php b/database/migrations/2024_06_13_101337_alter_images_products_table.php deleted file mode 100644 index db33a773..00000000 --- a/database/migrations/2024_06_13_101337_alter_images_products_table.php +++ /dev/null @@ -1,74 +0,0 @@ -get()->map(function (Product $productModel) { - FileStorageHelper::removeFile($productModel, 'picture'); - FileStorageHelper::removeOldFile($productModel, 'banner'); - FileStorageHelper::removeOldFile($productModel, 'packaging'); - $productModel->picture = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-300x200.png' - )) - ); - $productModel->banner = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-1440x420.png' - )) - ); - $productModel->packaging = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-315x450.png' - )) - ); - $productModel->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Product::query()->get()->map(function (Product $productModel) { - FileStorageHelper::removeFile($productModel, 'picture'); - FileStorageHelper::removeOldFile($productModel, 'banner'); - FileStorageHelper::removeOldFile($productModel, 'packaging'); - $productModel->picture = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-1440x420.png' - )) - ); - $productModel->banner = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-1440x420.png' - )) - ); - $productModel->packaging = FileStorageHelper::storeFile( - $productModel, - new \SplFileInfo(\resource_path( - '../database/factories/assets/products/default-picture-1440x420.png' - )) - ); - $productModel->saveQuietly(); - }); - } -}; diff --git a/database/migrations/2024_06_13_104248_add_slug_products_table.php b/database/migrations/2024_06_13_104248_add_slug_products_table.php deleted file mode 100644 index a1130779..00000000 --- a/database/migrations/2024_06_13_104248_add_slug_products_table.php +++ /dev/null @@ -1,38 +0,0 @@ -string('slug')->comment('Product slug.')->after('label'); - }); - Product::query()->get()->map(function (Product $productModel) { - $productModel->slug = Str::slug($productModel->label); - $productModel->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->dropColumn('slug'); - }); - } -}; diff --git a/database/migrations/2024_06_13_142049_alter_relations_products_table.php b/database/migrations/2024_06_13_142049_alter_relations_products_table.php deleted file mode 100644 index 45d93a63..00000000 --- a/database/migrations/2024_06_13_142049_alter_relations_products_table.php +++ /dev/null @@ -1,97 +0,0 @@ -foreignId('meat_id')->nullable()->after('ingredients') - ->comment('Product meat.') - ->constrained()->onUpdate('cascade')->onDelete('cascade'); - $table->foreignId('submeat_id')->nullable()->after('meat_id') - ->comment('Product submeat.') - ->constrained()->onUpdate('cascade')->onDelete('cascade'); - $table->foreignId('range_id')->nullable()->after('submeat_id') - ->comment('Product range.') - ->constrained()->onUpdate('cascade')->onDelete('cascade'); - $table->foreignId('subrange_id')->nullable()->after('range_id') - ->comment('Product subrange.') - ->constrained()->onUpdate('cascade')->onDelete('cascade'); - }); - DB::statement('DELETE FROM `productables` WHERE `productable_type` LIKE "%range"'); - DB::statement('DELETE FROM `productables` WHERE `productable_type` LIKE "%meat"'); - $rangeModels = Range::query()->get(); - $subrangeModels = Subrange::query()->get(); - $meatModels = Meat::query()->get(); - $submeatModels = Submeat::query()->get(); - Product::query()->get()->map(function (Product $productModel) use ( - $rangeModels, - $subrangeModels, - $meatModels, - $submeatModels, - ) { - (rand(0, 1)) - ? $productModel->range_id = collect($rangeModels->random(1))->first()->getKey() - : $productModel->subrange_id = collect($subrangeModels->random(1))->first()->getKey(); - (rand(0, 1)) - ? $productModel->meat_id = collect($meatModels->random(1))->first()->getKey() - : $productModel->submeat_id = collect($submeatModels->random(1))->first()->getKey(); - $productModel->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->dropForeign(['meat_id']); - $table->dropColumn('meat_id'); - $table->dropForeign(['submeat_id']); - $table->dropColumn('submeat_id'); - $table->dropForeign(['range_id']); - $table->dropColumn('range_id'); - $table->dropForeign(['subrange_id']); - $table->dropColumn('subrange_id'); - }); - $rangeModels = Range::query()->where('published', true)->get(); - $subrangeModels = Subrange::query()->where('published', true)->get(); - Product::query()->get()->map(function (Product $productModel) use ($rangeModels, $subrangeModels) { - if (rand(0, 1)) { - DB::table('productables')->insert( - [ - 'product_id' => $productModel->getKey(), - 'productable_id' => collect($rangeModels->random(1))->first()->getKey(), - 'productable_type' => "App\Models\Range" - ] - ); - } else { - DB::table('productables')->insert( - [ - 'product_id' => $productModel->getKey(), - 'productable_id' => collect($subrangeModels->random(1))->first()->getKey(), - 'productable_type' => "App\Models\Subrange" - ] - ); - } - }); - } -}; diff --git a/database/migrations/2024_06_13_164818_add_published_product_types_table.php b/database/migrations/2024_06_13_164818_add_published_product_types_table.php deleted file mode 100644 index 3b186c31..00000000 --- a/database/migrations/2024_06_13_164818_add_published_product_types_table.php +++ /dev/null @@ -1,39 +0,0 @@ -boolean('published')->comment('Product type publish status.')->after('button_status'); - }); - } - ProductType::query()->get()->map(function (ProductType $productTypeModel) { - $productTypeModel->published = true; - $productTypeModel->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('product_types', function (Blueprint $table) { - $table->dropColumn('published'); - }); - } -}; diff --git a/database/migrations/2024_06_20_125638_alter_routes_general_settings_table.php b/database/migrations/2024_06_20_125638_alter_routes_general_settings_table.php deleted file mode 100644 index f552b911..00000000 --- a/database/migrations/2024_06_20_125638_alter_routes_general_settings_table.php +++ /dev/null @@ -1,65 +0,0 @@ -where('type', SettingsType::mainMenu); - if (!(clone $query)->exists()) { - Artisan::call('db:seed', [ - 'class' => GeneralSettingSeeder::class - ]); - } - /** @var \App\Models\GeneralSetting|null */ - $generalSettingModel = GeneralSetting::query()->where('type', SettingsType::mainMenu)->first(); - if (!$generalSettingModel) { - throw new \Exception('Missing generalSettings ' . SettingsType::mainMenu->label()); - } - $generalSettingModel->value = collect($generalSettingModel->value)->map(function (\stdClass $item) { - if ($item->type->equals(MenuNodeType::ourProducts)) { - $item->link = (new Link(routeName: MenuNodeType::ourProducts->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::ourRecipes)) { - $item->link = (new Link(routeName: MenuNodeType::ourRecipes->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::recruitment)) { - $item->link = (new Link(routeName: MenuNodeType::recruitment->routeName()))->toArray(); - } - return $item; - }); - $generalSettingModel->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - $generalSettingModel = GeneralSetting::query()->where('type', SettingsType::mainMenu)->first(); - $generalSettingModel->value = collect($generalSettingModel->value)->map(function ($item) { - if ( - $item->type->equals(MenuNodeType::ourProducts) - || $item->type->equals(MenuNodeType::ourRecipes) - || $item->type->equals(MenuNodeType::recruitment) - ) { - $item->link = (new Link(routeName: 'fo.contact.show'))->toArray(); - } - return $item; - }); - $generalSettingModel->saveQuietly(); - } -}; diff --git a/database/migrations/2024_06_26_170458_add_button_link_demarches_table.php b/database/migrations/2024_06_26_170458_add_button_link_demarches_table.php deleted file mode 100644 index 701b06f2..00000000 --- a/database/migrations/2024_06_26_170458_add_button_link_demarches_table.php +++ /dev/null @@ -1,33 +0,0 @@ -string('button_url')->nullable()->after('picture_title') - ->comment('Approach button url (only for demarche).'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('approaches', function (Blueprint $table) { - $table->dropColumn('button_url'); - }); - } -}; diff --git a/database/migrations/2024_06_26_175000_add_subtitle_and_text_to_models_for_index_pages.php b/database/migrations/2024_06_26_175000_add_subtitle_and_text_to_models_for_index_pages.php deleted file mode 100644 index ee1a8aa4..00000000 --- a/database/migrations/2024_06_26_175000_add_subtitle_and_text_to_models_for_index_pages.php +++ /dev/null @@ -1,156 +0,0 @@ -string('subtitle')->after('title')->comment('Consumption moment subtitle of the page.'); - $table->text('description')->after('slug')->comment('Consumption moment description of the page.'); - $table->string('picture')->after('description')->comment('Consumption moment picture.'); - $table->string('picture_alt')->after('picture')->comment('Picture alt attribute.'); - $table->string('picture_title')->after('picture_alt')->comment('Picture title attribute.'); - }); - Schema::table('meats', function (Blueprint $table) { - $table->string('subtitle')->after('label')->comment('Meat subtitle of the page.'); - $table->string('picture')->after('banner_title')->comment('Meat picture.'); - $table->string('picture_alt')->after('picture')->comment('Picture alt attribute.'); - $table->string('picture_title')->after('picture_alt')->comment('Picture title attribute.'); - }); - Schema::table('submeats', function (Blueprint $table) { - $table->string('subtitle')->after('label')->comment('Submeat subtitle of the page.'); - $table->string('picture')->after('description')->comment('Submeat picture.'); - $table->string('picture_alt')->after('picture')->comment('Picture alt attribute.'); - $table->string('picture_title')->after('picture_alt')->comment('Picture title attribute.'); - }); - Schema::table('ranges', function (Blueprint $table) { - $table->string('subtitle')->after('label')->comment('Range subtitle of the page.'); - $table->string('picture')->after('banner_ambiance_title')->comment('Range picture.'); - $table->string('picture_alt')->after('picture')->comment('Picture alt attribute.'); - $table->string('picture_title')->after('picture_alt')->comment('Picture title attribute.'); - }); - Schema::table('subranges', function (Blueprint $table) { - $table->string('subtitle')->after('label')->comment('Subrange subtitle of the page.'); - $table->string('picture')->after('description')->comment('Subrange picture.'); - $table->string('picture_alt')->after('picture')->comment('Picture alt attribute.'); - $table->string('picture_title')->after('picture_alt')->comment('Picture title attribute.'); - }); - - ConsumptionMoment::query()->get()->map(function (ConsumptionMoment $model) { - $model->subtitle = "Sous-titre moment de consommation"; - $model->description = "Description moment de consommation"; - $model->picture = FileStorageHelper::storeFile( - $model, - new \SplFileInfo(\resource_path( - '../database/factories/assets/consumption_moments/default-picture-720x405.png' - )) - ); - $model->picture_alt = "text alternatif de l'image"; - $model->picture_title = "titre de l'image"; - $model->saveQuietly(); - }); - Meat::query()->get()->map(function (Meat $model) { - $model->subtitle = "Sous-titre viande"; - $model->picture = FileStorageHelper::storeFile( - $model, - new \SplFileInfo(\resource_path( - '../database/factories/assets/meats/default-picture-720x405.png' - )) - ); - $model->picture_alt = "text alternatif de l'image"; - $model->picture_title = "titre de l'image"; - $model->saveQuietly(); - }); - Submeat::query()->get()->map(function (Submeat $model) { - $model->subtitle = "Sous-titre sous-viande"; - $model->picture = FileStorageHelper::storeFile( - $model, - new \SplFileInfo(\resource_path( - '../database/factories/assets/submeats/default-picture-720x405.png' - )) - ); - $model->picture_alt = "text alternatif de l'image"; - $model->picture_title = "titre de l'image"; - $model->saveQuietly(); - }); - Range::query()->get()->map(function (Range $model) { - $model->subtitle = "Sous-titre gamme"; - $model->picture = FileStorageHelper::storeFile( - $model, - new \SplFileInfo(\resource_path( - '../database/factories/assets/ranges/default-picture-720x405.png' - )) - ); - $model->picture_alt = "text alternatif de l'image"; - $model->picture_title = "titre de l'image"; - $model->saveQuietly(); - }); - Subrange::query()->get()->map(function (Subrange $model) { - $model->subtitle = "Sous-titre sous-gamme"; - $model->picture = FileStorageHelper::storeFile( - $model, - new \SplFileInfo(\resource_path( - '../database/factories/assets/subranges/default-picture-720x405.png' - )) - ); - $model->picture_alt = "text alternatif de l'image"; - $model->picture_title = "titre de l'image"; - $model->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('consumption_moments', function (Blueprint $table) { - $table->dropColumn('subtitle'); - $table->dropColumn('description'); - $table->dropColumn('picture'); - $table->dropColumn('picture_alt'); - $table->dropColumn('picture_title'); - }); - Schema::table('meats', function (Blueprint $table) { - $table->dropColumn('subtitle'); - $table->dropColumn('picture'); - $table->dropColumn('picture_alt'); - $table->dropColumn('picture_title'); - }); - Schema::table('submeats', function (Blueprint $table) { - $table->dropColumn('subtitle'); - $table->dropColumn('picture'); - $table->dropColumn('picture_alt'); - $table->dropColumn('picture_title'); - }); - Schema::table('ranges', function (Blueprint $table) { - $table->dropColumn('subtitle'); - $table->dropColumn('picture'); - $table->dropColumn('picture_alt'); - $table->dropColumn('picture_title'); - }); - Schema::table('subranges', function (Blueprint $table) { - $table->dropColumn('subtitle'); - $table->dropColumn('picture'); - $table->dropColumn('picture_alt'); - $table->dropColumn('picture_title'); - }); - } -}; diff --git a/database/migrations/2024_07_01_101346_create_customer_password_resets_table.php b/database/migrations/2024_07_01_101346_create_customer_password_resets_table.php deleted file mode 100644 index 608fcfe1..00000000 --- a/database/migrations/2024_07_01_101346_create_customer_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('csutomer_password_resets'); - } -}; diff --git a/database/migrations/2024_07_01_101346_create_customers_table.php b/database/migrations/2024_07_01_101346_create_customers_table.php deleted file mode 100644 index 7829b8ca..00000000 --- a/database/migrations/2024_07_01_101346_create_customers_table.php +++ /dev/null @@ -1,37 +0,0 @@ -id(); - - $table->string('email')->unique()->comment('Customer unique email'); - $table->uuid('hashcode')->unique()->comment('Customer unique CRM hashcode'); - $table->string('username')->unique()->comment('Customer unique username'); - $table->rememberToken(); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('customers'); - } -}; diff --git a/database/migrations/2024_07_05_150846_add_date_fileds_on_customers.php b/database/migrations/2024_07_05_150846_add_date_fileds_on_customers.php deleted file mode 100644 index a9ce4590..00000000 --- a/database/migrations/2024_07_05_150846_add_date_fileds_on_customers.php +++ /dev/null @@ -1,34 +0,0 @@ -timestamp('email_verified_at')->nullable()->after('remember_token'); - $table->timestamp('last_connection')->nullable()->after('email_verified_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('customers', function (Blueprint $table) { - $table->dropColumn('email_verified_at'); - $table->dropColumn('last_connection'); - }); - } -} diff --git a/database/migrations/2024_07_05_150846_add_soft_delete_to_customers.php b/database/migrations/2024_07_05_150846_add_soft_delete_to_customers.php deleted file mode 100644 index 58a4fd44..00000000 --- a/database/migrations/2024_07_05_150846_add_soft_delete_to_customers.php +++ /dev/null @@ -1,32 +0,0 @@ -softDeletes(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('customers', function (Blueprint $table) { - $table->dropSoftDeletes(); - }); - } -} diff --git a/database/migrations/2024_07_05_150846_rename_table_csutomer_password_resets_to_customer_password_resets.php b/database/migrations/2024_07_05_150846_rename_table_csutomer_password_resets_to_customer_password_resets.php deleted file mode 100644 index 2c5e333a..00000000 --- a/database/migrations/2024_07_05_150846_rename_table_csutomer_password_resets_to_customer_password_resets.php +++ /dev/null @@ -1,27 +0,0 @@ -string('password')->comment('A enlever lors de la mise ne place CRM'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('customers', function (Blueprint $table) { - $table->dropColumn('password'); - }); - } -}; diff --git a/database/migrations/2024_07_10_111948_create_historical_milestones_table.php b/database/migrations/2024_07_10_111948_create_historical_milestones_table.php deleted file mode 100644 index 7d84fe3d..00000000 --- a/database/migrations/2024_07_10_111948_create_historical_milestones_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->year('year')->comment('Historical milestone year.'); - $table->string('title')->comment('Historical milestone title.'); - $table->text('description')->comment('Historical milestone description.'); - $table->string('picture')->comment('Historical milestone picture.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->boolean('published')->comment('Historical milestone publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('historical_milestones'); - } -}; diff --git a/database/migrations/2024_07_10_153957_add_minicrud_static_pages_table.php b/database/migrations/2024_07_10_153957_add_minicrud_static_pages_table.php deleted file mode 100644 index ac5c1b8d..00000000 --- a/database/migrations/2024_07_10_153957_add_minicrud_static_pages_table.php +++ /dev/null @@ -1,223 +0,0 @@ -string('seo_title')->nullable()->comment('Static page SEO title.')->change(); - $table->string('seo_description')->nullable()->comment('Static page SEO description.')->change(); - $table->string('title')->nullable()->comment('Static page title.')->change(); - $table->string('subtitle', 500)->nullable()->comment('Static page subtitle.')->change(); - $table->string('picture')->nullable()->comment('Static page picture.')->change(); - $table->string('picture_alt')->nullable()->comment('Picture alt attribute.')->change(); - $table->string('picture_title')->nullable()->comment('Picture title attribute.')->change(); - $table->text('content')->nullable()->comment('Static page content.')->change(); - $table->mediumText('data')->nullable()->after('content')->comment('Static page data.'); - }); - - // SAGA. - $staticPage = StaticPage::query()->where('type', StaticPageType::saga)->first(); - $staticPage->seo_title = "Seo title pour la page Saga publicitaire"; - $staticPage->seo_description = sprintf( - "Seo description pour la page Saga publicitaire du site %s", - config('app.name') - ); - $staticPage->title = "Saga"; - $staticPage->subtitle = "Sous-titre"; - $staticPage->slug = "saga"; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = "Contenu"; - $staticPage->data = [ - "title_content" => [ - "label" => "Titre du contenu", - "inputType" => InputType::string->value, - "value" => "le titre du contenu", - "validate" => "required|string|between:3,255", - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - - // RECIPES. - $staticPage = new StaticPage(); - $staticPage->type = StaticPageType::recipes; - $staticPage->seo_title = "Seo title pour la page des Recettes"; - $staticPage->seo_description = sprintf("Seo description pour la page Recettes du site %s", config('app.name')); - $staticPage->title = "Recettes"; - $staticPage->subtitle = "le sous-titre par défaut des recettes"; - $staticPage->slug = "recipes"; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = "le texte par défaut des recettes"; - $staticPage->data = []; - $staticPage->saveQuietly(); - - // RECIPE. - $staticPage = new StaticPage(); - $staticPage->type = StaticPageType::recipe; - $staticPage->seo_title = "Seo title pour la page d'une Recette"; - $staticPage->seo_description = sprintf("Seo description pour la page Recette du site %s", config('app.name')); - $staticPage->title = "Recette"; - $staticPage->subtitle = "Sous-titre"; - $staticPage->slug = "recipe"; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = null; - $staticPage->data = [ - "tips_title" => [ - "label" => "Titre de l'astuce", - "inputType" => InputType::string->value, - "value" => "le titre de l'astuce", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "recipes_title" => [ - "label" => "Titre des autres recettes", - "inputType" => InputType::string->value, - "value" => "le titre des autres recettes", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "text" => [ - "label" => "Texte des autres recettes", - "inputType" => InputType::text->value, - "value" => "le texte des autres recettes", - "validate" => 'required|string', - 'required' => true - ] - ]; - $staticPage->saveQuietly(); - - // PRODUCTS. - $staticPage = new StaticPage(); - $staticPage->type = StaticPageType::products; - $staticPage->seo_title = "Seo title pour la page des Produits"; - $staticPage->seo_description = sprintf("Seo description pour la page Produits du site %s", config('app.name')); - $staticPage->title = "Produits"; - $staticPage->subtitle = "le sous-titre par défaut des produits"; - $staticPage->slug = "products"; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = "le texte par défaut des produits"; - $staticPage->data = []; - $staticPage->saveQuietly(); - - // PRODUCT. - $staticPage = new StaticPage(); - $staticPage->type = StaticPageType::product; - $staticPage->seo_title = "Seo title pour la page d'un Produit"; - $staticPage->seo_description = sprintf("Seo description pour la page Produit du site %s", config('app.name')); - $staticPage->title = "Produit"; - $staticPage->subtitle = "Sous-titre"; - $staticPage->slug = "product"; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = null; - $staticPage->data = [ - "claim_title" => [ - "label" => "Titre des allégations", - "inputType" => InputType::string->value, - "value" => "le titre des allégations", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "products_title" => [ - "label" => "Titre des produits", - "inputType" => InputType::string->value, - "value" => "le titre des autres produits", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "products_text" => [ - "label" => "Texte des produits", - "inputType" => InputType::text->value, - "value" => "le texte des autres produits", - "validate" => 'required|string', - 'required' => true - ], - "animation_text_1" => [ - "label" => "Texte de l'animation 1", - "inputType" => InputType::string->value, - "value" => "le texte de l'animation 1", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "animation_text_2" => [ - "label" => "Texte de l'animation 2", - "inputType" => InputType::string->value, - "value" => "le texte de l'animation 2", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "recipes_title" => [ - "label" => "Titre des recettes", - "inputType" => InputType::string->value, - "value" => "le titre des recettes", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "recipes_text" => [ - "label" => "Texte des recettes", - "inputType" => InputType::text->value, - "value" => "le texte des recettes", - "validate" => 'required|string', - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - - // HOME. - $staticPage = new StaticPage(); - $staticPage->type = StaticPageType::home; - $staticPage->seo_title = "Seo title pour la page Accueil"; - $staticPage->seo_description = sprintf( - "Seo description pour la page Accueil du site %s", - config('app.name') - ); - $staticPage->title = "Accueil"; - $staticPage->subtitle = null; - $staticPage->slug = "Accueil"; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = null; - $staticPage->data = []; - $staticPage->saveQuietly(); - - DB::table('general_settings')->where('type', 3)->delete(); - DB::table('general_settings')->where('type', 4)->delete(); - DB::table('general_settings')->where('type', 5)->delete(); - DB::table('general_settings')->where('type', 6)->delete(); - } - - /** - * Reverse the migrations. - * - * @return void - * @throws \Error Wont undo that. - */ - public function down(): void - { - throw new \Error('Wont undo that'); - } -}; diff --git a/database/migrations/2024_07_11_115612_add_seo_fields_to_products_and_recipes_table.php b/database/migrations/2024_07_11_115612_add_seo_fields_to_products_and_recipes_table.php deleted file mode 100644 index b7c5297d..00000000 --- a/database/migrations/2024_07_11_115612_add_seo_fields_to_products_and_recipes_table.php +++ /dev/null @@ -1,55 +0,0 @@ -string('seo_title')->nullable()->comment('Product seo title.')->after('id'); - $table->string('seo_description')->nullable()->comment('Product seo description.')->after('seo_title'); - }); - Schema::table('recipes', function (Blueprint $table) { - $table->string('seo_title')->nullable()->comment('Recipe seo title.')->after('id'); - $table->string('seo_description')->nullable()->comment('Recipe seo description.')->after('seo_title'); - }); - - Product::query()->get()->map(function (Product $productModel) { - $productModel->seo_title = sprintf("Titre SEO de la page du produit %s", $productModel->label); - $productModel->seo_description = sprintf("Description SEO de la page du produit %s", $productModel->label); - $productModel->saveQuietly(); - }); - Recipe::query()->get()->map(function (Recipe $recipeModel) { - $recipeModel->seo_title = sprintf("Titre SEO de la page de la recette %s", $recipeModel->title); - $recipeModel->seo_description = sprintf("Description SEO de la page de la recette %s", $recipeModel->title); - $recipeModel->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->dropColumn('seo_title'); - $table->dropColumn('seo_description'); - }); - Schema::table('recipes', function (Blueprint $table) { - $table->dropColumn('seo_title'); - $table->dropColumn('seo_description'); - }); - } -}; diff --git a/database/migrations/2024_07_12_115553_create_offers_table.php b/database/migrations/2024_07_12_115553_create_offers_table.php deleted file mode 100644 index 3d9f7287..00000000 --- a/database/migrations/2024_07_12_115553_create_offers_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('title')->comment('Offer title.'); - $table->string('location')->comment('Offer location.'); - $table->string('contract')->comment('Offer contract.'); - $table->string('function')->comment('Offer function.'); - $table->string('picture')->comment('Offer picture.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->text('description')->comment('Offer description.'); - $table->boolean('published')->comment('Offer publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('offers'); - } -}; diff --git a/database/migrations/2024_07_25_122152_create_testimonials_table.php b/database/migrations/2024_07_25_122152_create_testimonials_table.php deleted file mode 100644 index 990b57a7..00000000 --- a/database/migrations/2024_07_25_122152_create_testimonials_table.php +++ /dev/null @@ -1,41 +0,0 @@ -id(); - $table->string('catchline')->comment('Testimonial catchline'); - $table->text('content')->comment('Testimonial content'); - $table->string('identity')->comment('Identity of the person'); - $table->string('job')->comment('Job of the person'); - $table->string('picture')->comment('Path of the picture of the testimonial (550x315)'); - $table->string('picture_alt')->comment('Alt attribute of the picture'); - $table->string('picture_title')->comment('Title attribute of the picture'); - $table->string('video_id')->nullable()->comment('Id of the video to display (youtube)'); - $table->integer('order')->comment('Testimonial order.'); - $table->boolean('published')->comment('Testimonial publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('testimonials'); - } -}; diff --git a/database/migrations/2024_07_31_092856_create_news_corporates_table.php b/database/migrations/2024_07_31_092856_create_news_corporates_table.php deleted file mode 100644 index f64c9237..00000000 --- a/database/migrations/2024_07_31_092856_create_news_corporates_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('title')->comment('The title of the news corporate.'); - $table->string('content')->comment('The content of the news corporate.'); - $table->string('url')->nullable()->comment('Linkedin url link.'); - $table->string('picture')->comment('Picture path.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->boolean('published')->comment('News corporate publish status.'); - $table->timestamp('publish_at')->nullable()->comment('News corporate publishment date.'); - $table->timestamp('unpublish_at')->nullable()->comment('News corporate unpublishment date.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('news_corporates'); - } -}; diff --git a/database/migrations/2024_08_06_160317_add_selling_to_static_pages.php b/database/migrations/2024_08_06_160317_add_selling_to_static_pages.php deleted file mode 100644 index 0588266f..00000000 --- a/database/migrations/2024_08_06_160317_add_selling_to_static_pages.php +++ /dev/null @@ -1,53 +0,0 @@ -type = $enumType; - $staticPage->seo_title = trans( - 'SEO title pour la page :label', - ['label' => $enumType->label()] - ); - $staticPage->seo_description = trans( - 'SEO description pour la page :label', - ['label' => $enumType->label()] - ); - $staticPage->title = trans($enumType->label()); - $staticPage->slug = Str::of($enumType->label())->slug(); - $staticPage->subtitle = null; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = trans('Le contenu de votre page'); - $staticPage->data = []; - $staticPage->saveQuietly(); - }//end foreach - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - $enumTypeArr = [StaticPageType::selling, StaticPageType::accessibility]; - foreach ($enumTypeArr as $type) { - StaticPage::query()->where('type', $type)->first()->delete(); - } - } -}; diff --git a/database/migrations/2024_08_09_155605_create_news_categories_table.php b/database/migrations/2024_08_09_155605_create_news_categories_table.php deleted file mode 100644 index 8d9f85f6..00000000 --- a/database/migrations/2024_08_09_155605_create_news_categories_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->string('seo_title')->comment('The seo title of the news category.'); - $table->string('seo_description')->comment('The seo description of the news category.'); - $table->string('title')->comment('News category title.'); - $table->string('slug')->unique()->comment('News category title slug.'); - $table->integer('order')->comment('News category order.'); - $table->boolean('published')->comment('News category publish status.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('news_categories'); - } -}; diff --git a/database/migrations/2024_08_10_153246_create_news_table.php b/database/migrations/2024_08_10_153246_create_news_table.php deleted file mode 100644 index 16c5ff1c..00000000 --- a/database/migrations/2024_08_10_153246_create_news_table.php +++ /dev/null @@ -1,45 +0,0 @@ -id(); - $table->string('seo_title')->comment('The seo title of the news.'); - $table->string('seo_description')->comment('The seo description of the news.'); - $table->string('title')->comment('The title of the news.'); - $table->string('subtitle')->nullable()->comment('The subtitle of the news.'); - $table->string('picture')->comment('Picture path.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->string('thumbnail')->comment('Thumbnail path.'); - $table->string('thumbnail_alt')->comment('Thumbnail alt attribute.'); - $table->string('thumbnail_title')->comment('Thumbnail title attribute.'); - $table->string('slug')->unique()->comment('Unique title slug'); - $table->text('content')->comment('The content of the news.'); - $table->foreignId('news_category_id')->constrained('news_categories') - ->restrictOnDelete()->comment('News category id'); - $table->boolean('highlight')->comment('News highlight status.'); - $table->boolean('published')->comment('News publish status.'); - $table->timestamp('publish_at')->nullable()->comment('News publishment date.'); - $table->timestamp('unpublish_at')->nullable()->comment('News unpublishment date.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('news'); - } -}; diff --git a/database/migrations/2024_08_22_105618_add_news_and_social_to_static_pages.php b/database/migrations/2024_08_22_105618_add_news_and_social_to_static_pages.php deleted file mode 100644 index 0787f1c8..00000000 --- a/database/migrations/2024_08_22_105618_add_news_and_social_to_static_pages.php +++ /dev/null @@ -1,53 +0,0 @@ -type = $enumType; - $staticPage->seo_title = trans( - 'SEO title pour la page :label', - ['label' => $enumType->label()] - ); - $staticPage->seo_description = trans( - 'SEO description pour la page :label', - ['label' => $enumType->label()] - ); - $staticPage->title = trans($enumType->label()); - $staticPage->slug = Str::of($enumType->label())->slug(); - $staticPage->subtitle = null; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = trans('Le contenu de votre page'); - $staticPage->data = []; - $staticPage->saveQuietly(); - }//end foreach - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - $enumTypeArr = [StaticPageType::news, StaticPageType::social]; - foreach ($enumTypeArr as $type) { - StaticPage::query()->where('type', $type)->first()->delete(); - } - } -}; diff --git a/database/migrations/2024_08_27_160303_make_product_id_nullable_on_videos_table.php b/database/migrations/2024_08_27_160303_make_product_id_nullable_on_videos_table.php deleted file mode 100644 index c139de1c..00000000 --- a/database/migrations/2024_08_27_160303_make_product_id_nullable_on_videos_table.php +++ /dev/null @@ -1,26 +0,0 @@ -unsignedBigInteger('product_id')->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - // Can't revert because some videos will have a null value in product_id foreign key. - } -}; diff --git a/database/migrations/2024_08_27_164534_replace_submeat_id_in_products.php b/database/migrations/2024_08_27_164534_replace_submeat_id_in_products.php deleted file mode 100644 index 72e69d5d..00000000 --- a/database/migrations/2024_08_27_164534_replace_submeat_id_in_products.php +++ /dev/null @@ -1,36 +0,0 @@ -with('submeat')->get(); - $actualSubmeatModelsIds = Submeat::query()->pluck('id'); - - foreach ($productModels as $productModel) { - if ($actualSubmeatModelsIds->doesntContain($productModel->submeat_id)) { - $productModel->submeat()->associate($actualSubmeatModelsIds->first()); - $productModel->save(); - } - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - // Can't be reverted because old ids don't exist. - } -}; diff --git a/database/migrations/2024_08_29_094103_alter_breeders_table.php b/database/migrations/2024_08_29_094103_alter_breeders_table.php deleted file mode 100644 index 276d30c0..00000000 --- a/database/migrations/2024_08_29_094103_alter_breeders_table.php +++ /dev/null @@ -1,74 +0,0 @@ -renameColumn('inuavs', 'inuav_codes')->comment('Array of inuav codes'); - $table->renameColumn('status', 'published'); - - // Add some columns. - $table->string('picture_alt')->nullable()->comment('Picture alt attribute.')->after('picture'); - $table->string('picture_title')->nullable()->comment('Picture title attribute.')->after('picture_alt'); - $table->string('department', 3)->comment('Breeder department - enum')->after('postal_code'); - $table->string('approaches')->comment('Array of associated approches')->after('picture3'); - $table->unsignedInteger('order')->comment('Breeder order')->after('approaches'); - $table->boolean('is_highlighted')->comment('Is the breeder highlighted ? (visible in carousel)')->after('published'); - }); - - $breederModels = Breeder::query()->get(); - - foreach ($breederModels as $breederModel) { - $breederModel->department = Department::make(Str::take($breederModel->postal_code, 2)); - $breederModel->picture_alt = trans('Photo de :first_name :last_name', [ - 'first_name' => $breederModel->first_name, - 'last_name' => $breederModel->last_name, - ]); - $breederModel->picture_title = trans('Photo de :first_name :last_name', [ - 'first_name' => $breederModel->first_name, - 'last_name' => $breederModel->last_name, - ]); - $breederModel->approaches = []; - $breederModel->order = $breederModel->id; - $breederModel->is_highlighted = $breederModel->published; - - $breederModel->save(); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('breeders', function (Blueprint $table) { - // Rename some columns. - $table->renameColumn('inuav_codes', 'inuavs')->comment('Array of inuav codes'); - $table->renameColumn('published', 'status'); - - // Remove some columns. - $table->dropColumn('picture_alt'); - $table->dropColumn('picture_title'); - $table->dropColumn('department'); - $table->dropColumn('approaches'); - $table->dropColumn('order'); - $table->dropColumn('is_highlighted'); - }); - } -}; diff --git a/database/migrations/2024_09_03_155707_create_news_breedings_table.php b/database/migrations/2024_09_03_155707_create_news_breedings_table.php deleted file mode 100644 index 69798da3..00000000 --- a/database/migrations/2024_09_03_155707_create_news_breedings_table.php +++ /dev/null @@ -1,45 +0,0 @@ -id(); - $table->string('seo_title')->comment('The seo title of the news breeding.'); - $table->string('seo_description')->comment('The seo description of the news breeding.'); - $table->string('title')->comment('The title of the news breeding.'); - $table->string('subtitle')->nullable()->comment('The title of the news breeding.'); - $table->string('picture')->comment('Picture path.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->string('slug')->comment('Unique title slug'); - $table->text('content')->comment('The content of the news breeding.'); - $table->unsignedTinyInteger('associated_page')->comment('Associated Page (StaticPageEnum)'); - $table->integer('order')->comment('News breeding order'); - $table->boolean('published')->comment('News breeding publish status.'); - $table->timestamp('publish_at')->nullable()->comment('News breeding publishment date.'); - $table->timestamp('unpublish_at')->nullable()->comment('News breeding unpublishment date.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('news_breedings'); - } -}; diff --git a/database/migrations/2024_09_03_171124_add_breeding_to_static_pages.php b/database/migrations/2024_09_03_171124_add_breeding_to_static_pages.php deleted file mode 100644 index 97c5409f..00000000 --- a/database/migrations/2024_09_03_171124_add_breeding_to_static_pages.php +++ /dev/null @@ -1,63 +0,0 @@ -where('type', $enumType); - $staticPage = $staticPageQuery->exists() ? $staticPageQuery->first() : new StaticPage(); - $staticPage->type = $enumType; - $staticPage->seo_title = trans( - 'SEO title pour la page :label', - ['label' => $enumType->label()] - ); - $staticPage->seo_description = trans( - 'SEO description pour la page :label', - ['label' => $enumType->label()] - ); - $staticPage->title = trans($enumType->label()); - $staticPage->slug = Str::of($enumType->label())->slug(); - $staticPage->subtitle = fake()->sentence(); - $staticPage->picture = FileStorageHelper::storeFile( - new StaticPage(), - new \SplFileInfo( - \resource_path('../database/factories/assets/static_pages/default-picture-720x405.jpg') - ) - ); - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = trans('Le contenu de votre page'); - $staticPage->data = []; - $staticPage->saveQuietly(); - } //end foreach - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - $enumTypeArr = StaticPageType::getBreedingPages(); - foreach ($enumTypeArr as $type) { - $query = StaticPage::query()->where('type', $type); - if ($query->exists()) { - $query->first()->deleteQuietly(); - } - } - } -}; diff --git a/database/migrations/2024_09_04_095651_create_customer_favorites_table.php b/database/migrations/2024_09_04_095651_create_customer_favorites_table.php deleted file mode 100644 index 70e5bd39..00000000 --- a/database/migrations/2024_09_04_095651_create_customer_favorites_table.php +++ /dev/null @@ -1,28 +0,0 @@ -foreignId('customer_id')->comment('The customer to associate.')->constrained() - ->onUpdate('no action')->onDelete('cascade'); - $table->morphs('customerable'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('customerables'); - } -}; diff --git a/database/migrations/2024_09_05_155517_add_breeder_map_text_to_general_settings_table.php b/database/migrations/2024_09_05_155517_add_breeder_map_text_to_general_settings_table.php deleted file mode 100644 index 73b26125..00000000 --- a/database/migrations/2024_09_05_155517_add_breeder_map_text_to_general_settings_table.php +++ /dev/null @@ -1,33 +0,0 @@ -insert([ - 'type' => SettingsType::breederMap, - 'value' => json_encode(GeneralSetting::getJsonLayout(SettingsType::breederMap)), - 'created_at' => now(), - 'updated_at' => now() - ]); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - GeneralSetting::query()->where('type', SettingsType::breederMap)->firstOrFail()->deleteQuietly(); - } -}; diff --git a/database/migrations/2024_09_18_084846_alter_routes_general_settings_table.php b/database/migrations/2024_09_18_084846_alter_routes_general_settings_table.php deleted file mode 100644 index 68bce197..00000000 --- a/database/migrations/2024_09_18_084846_alter_routes_general_settings_table.php +++ /dev/null @@ -1,65 +0,0 @@ -where('type', SettingsType::mainMenu)->first(); - if (!$generalSettingModel) { - throw new \Exception('Missing generalSettings ' . SettingsType::mainMenu->label()); - } - $generalSettingModel->value = collect($generalSettingModel->value)->map(function (\stdClass $item) { - if ($item->type->equals(MenuNodeType::ourCommitments)) { - $item->link = (new Link(routeName: MenuNodeType::ourCommitments->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::siteLogo)) { - $item->link = (new Link(routeName: MenuNodeType::siteLogo->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::breedings)) { - $item->link = (new Link(routeName: MenuNodeType::breedings->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::ourBrand)) { - $item->link = (new Link(routeName: MenuNodeType::ourBrand->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::news)) { - $item->link = (new Link(routeName: MenuNodeType::news->routeName()))->toArray(); - } - return $item; - }); - $generalSettingModel->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - $generalSettingModel = GeneralSetting::query()->where('type', SettingsType::mainMenu)->first(); - $generalSettingModel->value = collect($generalSettingModel->value)->map(function ($item) { - if ( - $item->type->equals(MenuNodeType::ourCommitments) - || $item->type->equals(MenuNodeType::siteLogo) - || $item->type->equals(MenuNodeType::breedings) - || $item->type->equals(MenuNodeType::ourBrand) - || $item->type->equals(MenuNodeType::news) - ) { - $item->link = (new Link(routeName: 'fo.contact.show'))->toArray(); - } - return $item; - }); - $generalSettingModel->saveQuietly(); - } -}; diff --git a/database/migrations/2024_09_18_123033_alter_tips_recipes_table.php b/database/migrations/2024_09_18_123033_alter_tips_recipes_table.php deleted file mode 100644 index 8a278a81..00000000 --- a/database/migrations/2024_09_18_123033_alter_tips_recipes_table.php +++ /dev/null @@ -1,30 +0,0 @@ -string('tips')->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - * @return void - */ - public function down(): void - { - Schema::table('recipes', function (Blueprint $table) { - $table->string('tips')->nullable(false)->change(); - }); - } -}; diff --git a/database/migrations/2024_09_18_124241_alter_advice_recipes_table.php b/database/migrations/2024_09_18_124241_alter_advice_recipes_table.php deleted file mode 100644 index 1b6e96ae..00000000 --- a/database/migrations/2024_09_18_124241_alter_advice_recipes_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('advice')->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('recipes', function (Blueprint $table) { - $table->string('advice')->nullable(false)->change(); - }); - } -}; diff --git a/database/migrations/2024_09_18_150649_remove_required_on_banner_in_products_table.php b/database/migrations/2024_09_18_150649_remove_required_on_banner_in_products_table.php deleted file mode 100644 index 60aa8924..00000000 --- a/database/migrations/2024_09_18_150649_remove_required_on_banner_in_products_table.php +++ /dev/null @@ -1,36 +0,0 @@ -string('banner')->nullable()->change(); - $table->string('banner_alt')->nullable()->change(); - $table->string('banner_title')->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->string('banner')->nullable(false)->change(); - $table->string('banner_alt')->nullable(false)->change(); - $table->string('banner_title')->nullable(false)->change(); - }); - } -}; diff --git a/database/migrations/2024_09_19_084122_alter_users_for_saml.php b/database/migrations/2024_09_19_084122_alter_users_for_saml.php deleted file mode 100644 index 797c82f6..00000000 --- a/database/migrations/2024_09_19_084122_alter_users_for_saml.php +++ /dev/null @@ -1,36 +0,0 @@ -dropColumn('email_verified_at'); - $table->dropColumn('password'); - $table->date('last_connection')->nullable()->after('role'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - $table->timestamp('email_verified_at')->nullable()->after('email'); - $table->string('password')->after('email_verified_at'); - $table->dropColumn('last_connection'); - }); - } -}; diff --git a/database/migrations/2024_09_19_093926_alter_cookingtime_recipes_table.php b/database/migrations/2024_09_19_093926_alter_cookingtime_recipes_table.php deleted file mode 100644 index 222a187f..00000000 --- a/database/migrations/2024_09_19_093926_alter_cookingtime_recipes_table.php +++ /dev/null @@ -1,28 +0,0 @@ -unsignedSmallInteger('cooking_time')->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('recipes', function (Blueprint $table) { - $table->unsignedSmallInteger('cooking_time')->nullable(false)->change(); - }); - } -}; diff --git a/database/migrations/2024_09_19_100415_alter_tips_length_recipes_table.php b/database/migrations/2024_09_19_100415_alter_tips_length_recipes_table.php deleted file mode 100644 index 763aaf86..00000000 --- a/database/migrations/2024_09_19_100415_alter_tips_length_recipes_table.php +++ /dev/null @@ -1,23 +0,0 @@ -string('tips', 500)->comment('Recipe tips.')->change(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void {} -}; diff --git a/database/migrations/2024_09_19_111335_remove_required_on_picture_in_products_table.php b/database/migrations/2024_09_19_111335_remove_required_on_picture_in_products_table.php deleted file mode 100644 index ceee6070..00000000 --- a/database/migrations/2024_09_19_111335_remove_required_on_picture_in_products_table.php +++ /dev/null @@ -1,36 +0,0 @@ -string('picture')->nullable()->change(); - $table->string('picture_alt')->nullable()->change(); - $table->string('picture_title')->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->string('picture')->nullable(false)->change(); - $table->string('picture_alt')->nullable(false)->change(); - $table->string('picture_title')->nullable(false)->change(); - }); - } -}; diff --git a/database/migrations/2024_09_19_114210_add_picto_placement_historical_milestone_table.php b/database/migrations/2024_09_19_114210_add_picto_placement_historical_milestone_table.php deleted file mode 100644 index 683c2221..00000000 --- a/database/migrations/2024_09_19_114210_add_picto_placement_historical_milestone_table.php +++ /dev/null @@ -1,30 +0,0 @@ -string('picto_placement')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('historical_milestones', function (Blueprint $table) { - $table->dropColumn('picto_placement'); - }); - } -}; diff --git a/database/migrations/2024_09_19_125103_add_order_to_historical_milestones_table.php b/database/migrations/2024_09_19_125103_add_order_to_historical_milestones_table.php deleted file mode 100644 index 53cdb7e5..00000000 --- a/database/migrations/2024_09_19_125103_add_order_to_historical_milestones_table.php +++ /dev/null @@ -1,45 +0,0 @@ -integer('order')->comment('Milestone order.'); - }); - - $this->setOrderForExistingMilestones(); - } - - private function setOrderForExistingMilestones(): void - { - // Récupérer tous les milestones actuels - $milestones = DB::table('historical_milestones')->orderBy('id')->get(); - - // Mettre à jour chaque milestone avec un ordre basé sur l'index - foreach ($milestones as $index => $milestone) { - DB::table('historical_milestones') - ->where('id', $milestone->id) - ->update(['order' => $index + 1]); // L'index commence à 0, donc +1 pour commencer à 1 - } - } - - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('historical_milestones', function (Blueprint $table) { - $table->dropColumn('order'); - }); - } -}; diff --git a/database/migrations/2024_09_19_142211_alter_source_key_numbers_table.php b/database/migrations/2024_09_19_142211_alter_source_key_numbers_table.php deleted file mode 100644 index d340bea3..00000000 --- a/database/migrations/2024_09_19_142211_alter_source_key_numbers_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('source')->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('key_numbers', function (Blueprint $table) { - $table->string('source')->nullable(false)->change(); - }); - } -}; diff --git a/database/migrations/2024_09_20_115443_alter_customers_for_migration.php b/database/migrations/2024_09_20_115443_alter_customers_for_migration.php deleted file mode 100644 index 7da48488..00000000 --- a/database/migrations/2024_09_20_115443_alter_customers_for_migration.php +++ /dev/null @@ -1,32 +0,0 @@ -string('hashcode')->after('email')->change(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('customers', function (Blueprint $table) { - $table->string('email')->after('hashcode')->change(); - }); - } -}; diff --git a/database/migrations/2024_09_20_150909_alter_product_static_pages_table.php b/database/migrations/2024_09_20_150909_alter_product_static_pages_table.php deleted file mode 100644 index 1f9ab0af..00000000 --- a/database/migrations/2024_09_20_150909_alter_product_static_pages_table.php +++ /dev/null @@ -1,128 +0,0 @@ -where('type', StaticPageType::product)->first(); - $staticPage->data = [ - "products_title" => [ - "label" => "Titre des produits", - "inputType" => InputType::string->value, - "value" => "le titre des autres produits", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "products_text" => [ - "label" => "Texte des produits", - "inputType" => InputType::text->value, - "value" => "le texte des autres produits", - "validate" => 'required|string', - 'required' => true - ], - "animation_text_1" => [ - "label" => "Texte de l'animation 1", - "inputType" => InputType::string->value, - "value" => "le texte de l'animation 1", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "animation_text_2" => [ - "label" => "Texte de l'animation 2", - "inputType" => InputType::string->value, - "value" => "le texte de l'animation 2", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "recipes_title" => [ - "label" => "Titre des recettes", - "inputType" => InputType::string->value, - "value" => "le titre des recettes", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "recipes_text" => [ - "label" => "Texte des recettes", - "inputType" => InputType::text->value, - "value" => "le texte des recettes", - "validate" => 'required|string', - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - // PRODUCT. - $staticPage = StaticPage::query()->where('type', StaticPageType::product)->first(); - $staticPage->data = [ - "claim_title" => [ - "label" => "Titre des allégations", - "inputType" => InputType::string->value, - "value" => "le titre des allégations", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "products_title" => [ - "label" => "Titre des produits", - "inputType" => InputType::string->value, - "value" => "le titre des autres produits", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "products_text" => [ - "label" => "Texte des produits", - "inputType" => InputType::text->value, - "value" => "le texte des autres produits", - "validate" => 'required|string', - 'required' => true - ], - "animation_text_1" => [ - "label" => "Texte de l'animation 1", - "inputType" => InputType::string->value, - "value" => "le texte de l'animation 1", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "animation_text_2" => [ - "label" => "Texte de l'animation 2", - "inputType" => InputType::string->value, - "value" => "le texte de l'animation 2", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "recipes_title" => [ - "label" => "Titre des recettes", - "inputType" => InputType::string->value, - "value" => "le titre des recettes", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "recipes_text" => [ - "label" => "Texte des recettes", - "inputType" => InputType::text->value, - "value" => "le texte des recettes", - "validate" => 'required|string', - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - } -}; diff --git a/database/migrations/2024_09_20_154248_add_claim_title_to_product_table.php b/database/migrations/2024_09_20_154248_add_claim_title_to_product_table.php deleted file mode 100644 index c995ffd7..00000000 --- a/database/migrations/2024_09_20_154248_add_claim_title_to_product_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('claim_title')->nullable()->comment('The claim title for a product.')->after('label'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->dropColumn('claim_title'); - }); - } -}; diff --git a/database/migrations/2024_09_23_092214_alter_tips_recipes_table.php b/database/migrations/2024_09_23_092214_alter_tips_recipes_table.php deleted file mode 100644 index aba71a97..00000000 --- a/database/migrations/2024_09_23_092214_alter_tips_recipes_table.php +++ /dev/null @@ -1,30 +0,0 @@ -string('tips', 500)->nullable()->change(); - }); - } - - /** - * Reverse the migrations. - * @return void - */ - public function down(): void - { - Schema::table('recipes', function (Blueprint $table) { - $table->string('tips', 500)->nullable(false)->change(); - }); - } -}; diff --git a/database/migrations/2024_10_04_100723_add_color_to_news_categories_table.php b/database/migrations/2024_10_04_100723_add_color_to_news_categories_table.php deleted file mode 100644 index bcbc37b89..00000000 --- a/database/migrations/2024_10_04_100723_add_color_to_news_categories_table.php +++ /dev/null @@ -1,34 +0,0 @@ -unsignedBigInteger('color')->after('slug')->comment('News associated color.'); - }); - NewsCategory::query()->get()->map(function (NewsCategory $category) { - $category->color = fake()->unique()->safeHexColor(); - $category->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('news_categories', function (Blueprint $table) { - $table->dropColumn('color'); - }); - } -}; diff --git a/database/migrations/2024_12_02_141232_create_departaimants_table.php b/database/migrations/2024_12_02_141232_create_departaimants_table.php deleted file mode 100644 index 06f3d004..00000000 --- a/database/migrations/2024_12_02_141232_create_departaimants_table.php +++ /dev/null @@ -1,48 +0,0 @@ -id(); - $table->smallInteger('type')->unsigned(); - /** - * bigInt = 8 octets (64bits) - * Donc à raison de 2 colonnes par départements - * on peut en stocker 32 dans un big int - * Il existe 101 départements Français - * Donc il faut 32*4 = 128 - * au moins 4 colonnes - */ - $table->bigInteger('col1')->unsigned()->default(0); - $table->bigInteger('col2')->unsigned()->default(0); - $table->bigInteger('col3')->unsigned()->default(0); - $table->bigInteger('col4')->unsigned()->default(0); - $table->foreignId('customer_id'); - $table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade'); - $table->timestamps(); - $table->unique(['type', 'customer_id']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('departaimants'); - } -} diff --git a/database/migrations/2024_12_09_112347_create_messages_table.php b/database/migrations/2024_12_09_112347_create_messages_table.php deleted file mode 100644 index 10cadf4f..00000000 --- a/database/migrations/2024_12_09_112347_create_messages_table.php +++ /dev/null @@ -1,39 +0,0 @@ -id(); - $table->string('message', 255); - $table->boolean('hide_from')->default(false); - $table->boolean('hide_to')->default(false); - $table->foreignId('from')->nullable(); - $table->foreign('from')->references('id')->on('customers')->cascadeOnDelete(); - $table->foreignId('to')->nullable(); - $table->foreign('to')->references('id')->on('customers')->cascadeOnDelete(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('messages'); - } -} diff --git a/database/migrations/2024_12_10_171912_create_block_lists_table.php b/database/migrations/2024_12_10_171912_create_block_lists_table.php deleted file mode 100644 index fdcc8d3a..00000000 --- a/database/migrations/2024_12_10_171912_create_block_lists_table.php +++ /dev/null @@ -1,36 +0,0 @@ -id(); - $table->foreignId('customer_id')->nullable(); - $table->foreign('customer_id')->references('id')->on('customers')->cascadeOnDelete(); - $table->foreignId('blocked_id')->nullable(); - $table->foreign('blocked_id')->references('id')->on('customers')->cascadeOnDelete(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('block_lists'); - } -} diff --git a/database/migrations/2024_12_24_160304_create_notifications.php b/database/migrations/2024_12_24_160304_create_notifications.php deleted file mode 100644 index 828067a2..00000000 --- a/database/migrations/2024_12_24_160304_create_notifications.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->tinyInteger('type'); - $table->morphs('notifiable'); - $table->string('content'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('notifications'); - } -} diff --git a/database/migrations/2024_12_24_161902_create_notifications_read.php b/database/migrations/2024_12_24_161902_create_notifications_read.php deleted file mode 100644 index e248d17d..00000000 --- a/database/migrations/2024_12_24_161902_create_notifications_read.php +++ /dev/null @@ -1,33 +0,0 @@ -foreignId('notification_id')->constrained('notifications')->onDelete('cascade'); - $table->foreignId('customer_id')->constrained('customers'); - $table->primary(['notification_id', 'customer_id']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('notifications_read'); - } -} diff --git a/database/migrations/2024_12_24_171920_add_customer_id_to_notifications_table.php b/database/migrations/2024_12_24_171920_add_customer_id_to_notifications_table.php deleted file mode 100644 index fee2bcd7..00000000 --- a/database/migrations/2024_12_24_171920_add_customer_id_to_notifications_table.php +++ /dev/null @@ -1,35 +0,0 @@ -foreignId('customer_id')->nullable()->after('content'); - $table->foreign('customer_id')->references('id')->on('customers')->cascadeOnDelete(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('notifications', function (Blueprint $table) { - $table->dropForeign(['customer_id']); - $table->dropColumn(['customer_id']); - }); - } -} diff --git a/database/migrations/2024_12_24_171921_update_relations_options_products_table.php b/database/migrations/2024_12_24_171921_update_relations_options_products_table.php deleted file mode 100644 index f8f150b7..00000000 --- a/database/migrations/2024_12_24_171921_update_relations_options_products_table.php +++ /dev/null @@ -1,90 +0,0 @@ -dropForeign(['approach_id']); - $table->dropForeign(['meat_id']); - $table->dropForeign(['submeat_id']); - $table->dropForeign(['range_id']); - $table->dropForeign(['subrange_id']); - $table->foreign('approach_id') - ->references('id') - ->on('approaches') - ->onUpdate('SET NULL') - ->onDelete('SET NULL'); - $table->foreign('meat_id') - ->references('id') - ->on('meats') - ->onUpdate('SET NULL') - ->onDelete('SET NULL'); - $table->foreign('submeat_id') - ->references('id') - ->on('submeats') - ->onUpdate('SET NULL') - ->onDelete('SET NULL'); - $table->foreign('range_id') - ->references('id') - ->on('ranges') - ->onUpdate('SET NULL') - ->onDelete('SET NULL'); - $table->foreign('subrange_id') - ->references('id') - ->on('subranges') - ->onUpdate('SET NULL') - ->onDelete('SET NULL'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('products', function (Blueprint $table) { - $table->dropForeign(['approach_id']); - $table->dropForeign(['meat_id']); - $table->dropForeign(['submeat_id']); - $table->dropForeign(['range_id']); - $table->dropForeign(['subrange_id']); - $table->foreign('approach_id') - ->references('id') - ->on('approaches') - ->onUpdate('CASCADE') - ->onDelete('CASCADE'); - $table->foreign('meat_id') - ->references('id') - ->on('meats') - ->onUpdate('CASCADE') - ->onDelete('CASCADE'); - $table->foreign('submeat_id') - ->references('id') - ->on('submeats') - ->onUpdate('CASCADE') - ->onDelete('CASCADE'); - $table->foreign('range_id') - ->references('id') - ->on('ranges') - ->onUpdate('CASCADE') - ->onDelete('CASCADE'); - $table->foreign('subrange_id') - ->references('id') - ->on('subranges') - ->onUpdate('CASCADE') - ->onDelete('CASCADE'); - }); - } -}; diff --git a/database/migrations/2024_12_25_104803_add_fields_to_static_page_offers_table.php b/database/migrations/2024_12_25_104803_add_fields_to_static_page_offers_table.php deleted file mode 100644 index 0f611dad..00000000 --- a/database/migrations/2024_12_25_104803_add_fields_to_static_page_offers_table.php +++ /dev/null @@ -1,109 +0,0 @@ -where('type', StaticPageType::recruitment)->first(); - $staticPage->data = [ - "offers_title" => [ - "label" => "Titre des offres", - "inputType" => InputType::string->value, - "value" => "le titre des offres", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "offers_description" => [ - "label" => "Description des offres", - "inputType" => InputType::text->value, - "value" => "la description des offres", - "validate" => "required|string|min:15", - 'required' => true - ], - "jobs_title" => [ - "label" => "Titre des métiers", - "inputType" => InputType::string->value, - "value" => "le titre des métiers", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "jobs_description" => [ - "label" => "Description des métiers", - "inputType" => InputType::text->value, - "value" => "la description des métiers", - "validate" => "required|string|min:15", - 'required' => true - ], - "testimonies_title" => [ - "label" => "Titre des témoignages", - "inputType" => InputType::string->value, - "value" => "le titre des témoignages", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "testimonies_description" => [ - "label" => "Description des témoignages", - "inputType" => InputType::text->value, - "value" => "la description des témoignages", - "validate" => "required|string|min:15", - 'required' => true - ], - "advantages_title" => [ - "label" => "Titre des avantages", - "inputType" => InputType::string->value, - "value" => "le titre des avantages", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "advantages_description" => [ - "label" => "Description des avantages", - "inputType" => InputType::text->value, - "value" => "la description des avantages", - "validate" => "required|string|min:15", - 'required' => true - ], - "actualities_title" => [ - "label" => "Titre des actualités", - "inputType" => InputType::string->value, - "value" => "le titre des actualités", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "actualities_description" => [ - "label" => "Description des actualités", - "inputType" => InputType::text->value, - "value" => "la description des actualités", - "validate" => "required|string|min:15", - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('static_pages', function () { - // RECRUITMENT. - $staticPage = StaticPage::query()->where('type', StaticPageType::recruitment)->first(); - $staticPage->data = []; - $staticPage->saveQuietly(); - }); - } -}; diff --git a/database/migrations/2024_12_25_175858_add_published_at_offers_table.php b/database/migrations/2024_12_25_175858_add_published_at_offers_table.php deleted file mode 100644 index 7ea16bdc..00000000 --- a/database/migrations/2024_12_25_175858_add_published_at_offers_table.php +++ /dev/null @@ -1,38 +0,0 @@ -timestamp('publish_at')->comment('Slide publishment date.')->after('published'); - }); - Offer::query()->get()->map(function (Offer $offer) { - $offer->publish_at = Carbon::now(); - $offer->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('offers', function (Blueprint $table) { - $table->dropColumn('publish_at'); - }); - } -}; diff --git a/database/migrations/2024_12_25_175900_add_count_offers_from_job_general_settings_table.php b/database/migrations/2024_12_25_175900_add_count_offers_from_job_general_settings_table.php deleted file mode 100644 index 03f1f805..00000000 --- a/database/migrations/2024_12_25_175900_add_count_offers_from_job_general_settings_table.php +++ /dev/null @@ -1,33 +0,0 @@ -insert([ - 'type' => SettingsType::offersCount, - 'value' => json_encode(GeneralSetting::getJsonLayout(SettingsType::offersCount)), - 'created_at' => now(), - 'updated_at' => now() - ]); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - GeneralSetting::query()->where('type', SettingsType::offersCount)->firstOrFail()->deleteQuietly(); - } -}; diff --git a/database/migrations/2024_12_26_114011_add_link_offers_table.php b/database/migrations/2024_12_26_114011_add_link_offers_table.php deleted file mode 100644 index 194f4447..00000000 --- a/database/migrations/2024_12_26_114011_add_link_offers_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('link')->comment('Offer link.')->after('picture_title'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('offers', function (Blueprint $table) { - $table->dropColumn('link'); - }); - } -}; diff --git a/database/migrations/2024_12_26_154709_alter_recruitments_static_pages_table.php b/database/migrations/2024_12_26_154709_alter_recruitments_static_pages_table.php deleted file mode 100644 index 696cc861..00000000 --- a/database/migrations/2024_12_26_154709_alter_recruitments_static_pages_table.php +++ /dev/null @@ -1,70 +0,0 @@ -where('type', StaticPageType::story)->first(); - $staticPage->data = [ - "image" => [ - 'label' => 'Image', - "inputType" => InputType::image->value, - 'dimensions' => ['width' => 1280, 'height' => 720], - 'alt' => "Image attribut alt", - 'title' => "Image attribut titre", - 'value' => "", - 'validate' => 'required', - 'required' => true - ], - "link" => [ - "label" => "Lien", - "inputType" => InputType::url->value, - "value" => "https://google.com", - "validate" => "required|string|url:http,https", - 'required' => true - ], - "link_label" => [ - "label" => "Label du lien", - "inputType" => InputType::string->value, - "value" => "Label du bouton", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "link_new_tab" => [ - "label" => "Ouverture du lien dans un nouvel onglet", - "inputType" => InputType::boolean->value, - "value" => true, - "validate" => "required|boolean", - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('static_pages', function () { - // STORY. - $staticPage = StaticPage::query()->where('type', StaticPageType::story)->first(); - $staticPage->data = []; - $staticPage->saveQuietly(); - }); - } -}; diff --git a/database/migrations/2024_21_26_161928_message_as_encrypted.php b/database/migrations/2024_21_26_161928_message_as_encrypted.php deleted file mode 100644 index 9e830e1d..00000000 --- a/database/migrations/2024_21_26_161928_message_as_encrypted.php +++ /dev/null @@ -1,47 +0,0 @@ -get(); - Schema::table('messages', function (Blueprint $table) { - $table->text('message')->change(); - }); - $messages->each(function (object $message) { - DB::table('messages')->where('id', $message->id)->update([ - 'message' => Crypt::encryptString($message->message) - ]); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - $messages = DB::table('messages')->get(); - $messages->each(function (object $message) { - DB::table('messages')->where('id', $message->id)->update([ - 'message' => Str::limit(Crypt::decryptString($message->message), 255) - ]); - }); - Schema::table('messages', function (Blueprint $table) { - $table->string('message')->change(); - }); - } -}; diff --git a/database/migrations/2024_21_27_112704_add_titles_descriptions_story_static_pages_table.php b/database/migrations/2024_21_27_112704_add_titles_descriptions_story_static_pages_table.php deleted file mode 100644 index be134bab..00000000 --- a/database/migrations/2024_21_27_112704_add_titles_descriptions_story_static_pages_table.php +++ /dev/null @@ -1,130 +0,0 @@ -where('type', StaticPageType::story)->first(); - $staticPage->data = [ - "image" => [ - 'label' => 'Image', - "inputType" => InputType::image->value, - 'dimensions' => ['width' => 1280, 'height' => 720], - 'alt' => "Image attribut alt", - 'title' => "Image attribut titre", - 'value' => "", - 'validate' => 'required', - 'required' => true - ], - "link" => [ - "label" => "Lien", - "inputType" => InputType::url->value, - "value" => "https://google.com", - "validate" => "required|string|url:http,https", - 'required' => true - ], - "link_label" => [ - "label" => "Label du lien", - "inputType" => InputType::string->value, - "value" => "Label du bouton", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "link_new_tab" => [ - "label" => "Ouverture du lien dans un nouvel onglet", - "inputType" => InputType::boolean->value, - "value" => true, - "validate" => "required|boolean", - 'required' => true - ], - "keynumbers_title" => [ - "label" => "Titre des chiffres clés", - "inputType" => InputType::string->value, - "value" => "le titre des chiffres clés", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "keynumbers_description" => [ - "label" => "Description des chiffres clés", - "inputType" => InputType::text->value, - "value" => "la description des chiffres clés", - "validate" => "required|string|min:15", - 'required' => true - ], - "story_title" => [ - "label" => "Titre de l'histoire", - "inputType" => InputType::string->value, - "value" => "le titre de l'histoire", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "story_description" => [ - "label" => "Description de l'histoire", - "inputType" => InputType::text->value, - "value" => "la description de l'histoire", - "validate" => "required|string|min:15", - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('static_pages', function () { - // STORY. - $staticPage = StaticPage::query()->where('type', StaticPageType::story)->first(); - $staticPage->data = [ - "image" => [ - 'label' => 'Image', - "inputType" => InputType::image->value, - 'dimensions' => ['width' => 1280, 'height' => 720], - 'alt' => "Image attribut alt", - 'title' => "Image attribut titre", - 'value' => "", - 'validate' => 'required', - 'required' => true - ], - "link" => [ - "label" => "Lien", - "inputType" => InputType::url->value, - "value" => "https://google.com", - "validate" => "required|string|url:http,https", - 'required' => true - ], - "link_label" => [ - "label" => "Label du lien", - "inputType" => InputType::string->value, - "value" => "Label du bouton", - "validate" => "required|string|between:3,255", - 'required' => true - ], - "link_new_tab" => [ - "label" => "Ouverture du lien dans un nouvel onglet", - "inputType" => InputType::boolean->value, - "value" => true, - "validate" => "required|boolean", - 'required' => true - ], - ]; - $staticPage->saveQuietly(); - }); - } -}; diff --git a/database/migrations/2024_21_27_113004_alter_historical_milestones_table.php b/database/migrations/2024_21_27_113004_alter_historical_milestones_table.php deleted file mode 100644 index e7022145..00000000 --- a/database/migrations/2024_21_27_113004_alter_historical_milestones_table.php +++ /dev/null @@ -1,40 +0,0 @@ -string('picture')->nullable()->comment('Historical milestone picture.')->change(); - $table->string('picture_alt')->nullable()->comment('Picture alt attribute.')->change(); - $table->string('picture_title')->nullable()->comment('Picture title attribute.')->change(); - $table->string('video_id')->nullable()->comment('Historical milestone video ID.')->after('picture_title'); - $table->string('picto')->nullable()->comment('Historical milestone picto.')->after('video_id'); - $table->string('picto_alt')->nullable()->comment('Picture alt attribute.')->after('picto'); - $table->string('picto_title')->nullable()->comment('Picture title attribute.')->after('picto_alt'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('historical_milestones', function (Blueprint $table) { - $table->dropColumn('picto'); - $table->dropColumn('picto_alt'); - $table->dropColumn('picto_title'); - }); - } -}; diff --git a/database/migrations/2024_21_27_114005_alter_customers_table.php b/database/migrations/2024_21_27_114005_alter_customers_table.php deleted file mode 100644 index 598a646f..00000000 --- a/database/migrations/2024_21_27_114005_alter_customers_table.php +++ /dev/null @@ -1,38 +0,0 @@ -dropColumn('hashcode'); - $table->dropColumn('password'); - }); - Schema::table('customers', function (Blueprint $table) { - $table->uuid('hashcode')->unique()->after('id')->comment('Customer unique CRM hashcode.'); - $table->string('email')->comment('Customer unique email.')->change(); - $table->string('username')->comment('Customer unique username.')->change(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('customers', function (Blueprint $table) { - $table->string('password')->comment('A enlever lors de la mise en place CRM'); - }); - } -}; diff --git a/database/migrations/2024_21_27_114006_create_news_clubs_table.php b/database/migrations/2024_21_27_114006_create_news_clubs_table.php deleted file mode 100644 index ee215bb3..00000000 --- a/database/migrations/2024_21_27_114006_create_news_clubs_table.php +++ /dev/null @@ -1,42 +0,0 @@ -id(); - $table->string('title')->comment('News club title.'); - $table->string('slug')->unique()->comment('News club title slug.'); - $table->string('picture')->comment('News club picture path.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->text('content')->nullable()->comment('News club content.'); - $table->integer('type')->comment('News club type.'); - $table->boolean('multiple_answers')->comment('News club multiple answers.'); - $table->boolean('published')->comment('News club publish status.'); - $table->timestamp('publish_at')->nullable()->comment('News club publishment date.'); - $table->timestamp('unpublish_at')->nullable()->comment('News club unpublishment date.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('news_clubs'); - } -}; diff --git a/database/migrations/2024_21_27_114007_create_surveys_answers_table.php b/database/migrations/2024_21_27_114007_create_surveys_answers_table.php deleted file mode 100644 index de27370f..00000000 --- a/database/migrations/2024_21_27_114007_create_surveys_answers_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->foreignId('news_club_id')->comment('Survey answer news club associated.') - ->constrained('news_clubs')->onUpdate('cascade')->onDelete('cascade'); - $table->boolean('published')->comment('Survey answer status.'); - $table->string('answer')->comment('Survey answer.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('surveys_answers'); - } -}; diff --git a/database/migrations/2024_21_27_123904_create_discounts_table.php b/database/migrations/2024_21_27_123904_create_discounts_table.php deleted file mode 100644 index 3b901329..00000000 --- a/database/migrations/2024_21_27_123904_create_discounts_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('name')->comment('Discount name.'); - $table->string('desktop_image_available')->comment('Discount desktop image available.'); - $table->string('desktop_image_unavailable')->comment('Discount desktop image unavailable.'); - $table->string('mobile_image_available')->comment('Discount mobile image available.'); - $table->string('mobile_image_unavailable')->comment('Discount mobile image unavailable.'); - $table->bigInteger('code')->unique()->comment('Discount code.'); - $table->double('value')->comment('Discount value.'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('discounts'); - } -}; diff --git a/database/migrations/2024_21_27_123905_create_sell_items_table.php b/database/migrations/2024_21_27_123905_create_sell_items_table.php deleted file mode 100644 index e18748e4..00000000 --- a/database/migrations/2024_21_27_123905_create_sell_items_table.php +++ /dev/null @@ -1,39 +0,0 @@ -id()->comment('Sell item id.'); - $table->string('name')->comment('Sell item name.'); - $table->string('picture')->comment('Sell item picture path.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->float('price')->comment('Sell item price.'); - $table->smallInteger('arcadia_weight')->default(0)->comment('Sell item arcadia weight.'); - $table->integer('arcadia_id')->unique()->comment('Sell item arcadia id.'); - $table->integer('order')->comment('Sell item order'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('sell_items'); - } -}; diff --git a/database/migrations/2024_21_27_123906_create_orders_table.php b/database/migrations/2024_21_27_123906_create_orders_table.php deleted file mode 100644 index 46a7f0d3..00000000 --- a/database/migrations/2024_21_27_123906_create_orders_table.php +++ /dev/null @@ -1,45 +0,0 @@ -id(); - $table->uuid('ref')->unique()->comment('Order reference.'); - $table->string('firstname')->comment('Order firstname author.'); - $table->string('lastname')->comment('Order lastname author.'); - $table->string('address')->comment('Order address author.'); - $table->string('postcode')->comment('Order postcode author.'); - $table->string('phone')->nullable()->comment('Order phone author.'); - $table->string('email')->comment('Order email author.'); - $table->string('city')->comment('Order city author.'); - $table->tinyInteger('civility')->comment('Order civility author.'); - $table->tinyInteger('status')->comment('Order status.'); - $table->tinyInteger('payementType')->comment('Order payement type.'); - $table->boolean('confirmMailSent')->default(false)->comment('Order sent mail confirm.'); - $table->foreignId('customer_id')->comment('Customer associated to the order.') - ->constrained('customers')->onUpdate('cascade')->onDelete('cascade'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('orders'); - } -}; diff --git a/database/migrations/2024_21_27_123907_create_order_sell_item_table.php b/database/migrations/2024_21_27_123907_create_order_sell_item_table.php deleted file mode 100644 index c5134e75..00000000 --- a/database/migrations/2024_21_27_123907_create_order_sell_item_table.php +++ /dev/null @@ -1,36 +0,0 @@ -id(); - $table->smallInteger('quantity')->comment('Order sell items quantity.'); - $table->foreignId('order_id')->comment('Order associated to the sell item.') - ->constrained('orders')->onUpdate('cascade')->onDelete('cascade'); - $table->foreignId('sell_item_id')->comment('Sell item associated to the order.') - ->constrained('sell_items')->onUpdate('cascade')->onDelete('cascade'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('order_sell_item'); - } -}; diff --git a/database/migrations/2024_21_27_123908_create_delivery_addresses_table.php b/database/migrations/2024_21_27_123908_create_delivery_addresses_table.php deleted file mode 100644 index 9689934b..00000000 --- a/database/migrations/2024_21_27_123908_create_delivery_addresses_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('firstname')->comment('Delivery address author firstname.'); - $table->string('lastname')->comment('Delivery address author lastname.'); - $table->string('address')->comment('Delivery address address.'); - $table->string('postcode')->comment('Delivery address postcode.'); - $table->string('phone')->nullable()->comment('Delivery address author phone.'); - $table->string('city')->comment('Delivery address city.'); - $table->tinyInteger('civility')->comment('Delivery address author civility.'); - $table->foreignId('order_id')->comment('Order associated to the delivery address.') - ->constrained('orders')->onUpdate('cascade')->onDelete('cascade'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('delivery_addresses'); - } -}; diff --git a/database/migrations/2024_21_27_123909_add_order_to_survey_answers_table.php b/database/migrations/2024_21_27_123909_add_order_to_survey_answers_table.php deleted file mode 100644 index ec39b515..00000000 --- a/database/migrations/2024_21_27_123909_add_order_to_survey_answers_table.php +++ /dev/null @@ -1,37 +0,0 @@ -integer('order')->comment('Survey answer order.')->after('news_club_id'); - }); - SurveysAnswer::query()->get()->map(function ($surveyAnswerModel) { - $surveyAnswerModel->order = \intval(SurveysAnswer::query()->max('order')) + 1; - $surveyAnswerModel->saveQuietly(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('surveys_answers', function (Blueprint $table) { - $table->dropColumn('order'); - }); - } -}; diff --git a/database/migrations/2024_21_27_123910_add_type_sell_items_table.php b/database/migrations/2024_21_27_123910_add_type_sell_items_table.php deleted file mode 100644 index 4623c47b..00000000 --- a/database/migrations/2024_21_27_123910_add_type_sell_items_table.php +++ /dev/null @@ -1,33 +0,0 @@ -tinyInteger('type')->comment('Sell item type.')->default(SellItemsType::paper)->after('order'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('sell_items', function (Blueprint $table) { - $table->dropColumn('type'); - }); - } -}; diff --git a/database/migrations/2024_21_27_123911_alter_menu_node_general_settings_table.php b/database/migrations/2024_21_27_123911_alter_menu_node_general_settings_table.php deleted file mode 100644 index d43ed872..00000000 --- a/database/migrations/2024_21_27_123911_alter_menu_node_general_settings_table.php +++ /dev/null @@ -1,71 +0,0 @@ -where('type', SettingsType::mainMenu)->first(); - if (!$generalSettingModel) { - throw new \Exception('Missing generalSettings ' . SettingsType::mainMenu->label()); - } - $generalSettingModel->value = collect($generalSettingModel->value)->map(function (\stdClass $item, int $key) { - if ($item->type->equals(MenuNodeType::ourCommitments)) { - $item->link = (new Link(routeName: MenuNodeType::ourCommitments->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::siteLogo)) { - $item->link = (new Link(routeName: MenuNodeType::siteLogo->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::breedings)) { - $item->link = (new Link(routeName: MenuNodeType::breedings->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::ourBrand)) { - $item->link = (new Link(routeName: MenuNodeType::ourBrand->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::news)) { - $item->link = (new Link(routeName: MenuNodeType::news->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::ourProducts)) { - $item->link = (new Link(routeName: MenuNodeType::ourProducts->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::ourRecipes)) { - $item->link = (new Link(routeName: MenuNodeType::ourRecipes->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::recruitment)) { - $item->link = (new Link(routeName: MenuNodeType::recruitment->routeName()))->toArray(); - } elseif ($item->type->equals(MenuNodeType::link)) { - $item->link = (new Link(url: ""))->toArray(); - } - $item->id = $key + 1; - return $item; - }); - $generalSettingModel->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - * @throws \Exception Missing generalSettings. - */ - public function down(): void - { - /** @var \App\Models\GeneralSetting|null */ - $generalSettingModel = GeneralSetting::query()->where('type', SettingsType::mainMenu)->first(); - if (!$generalSettingModel) { - throw new \Exception('Missing generalSettings ' . SettingsType::mainMenu->label()); - } - $generalSettingModel->value = collect($generalSettingModel->value)->map(function (\stdClass $item) { - $item = collect($item)->except(['id']); - return $item; - }); - $generalSettingModel->saveQuietly(); - } -}; diff --git a/database/migrations/2024_21_27_123912_add_elements_in_sellitems_table.php b/database/migrations/2024_21_27_123912_add_elements_in_sellitems_table.php deleted file mode 100644 index 751c050d..00000000 --- a/database/migrations/2024_21_27_123912_add_elements_in_sellitems_table.php +++ /dev/null @@ -1,59 +0,0 @@ -name = trans('CARTE DÉPART\'AIMANTS'); - $sellItemModel->picture = FileStorageHelper::storeFile( - $sellItemModel, - new \SplFileInfo(\resource_path('assets/images/club/shop/map.jpg')) - ); - $sellItemModel->picture_alt = trans('Carte départ\'aimants'); - $sellItemModel->picture_title = trans('Carte départ\'aimants en papier'); - $sellItemModel->price = 4.00; - $sellItemModel->arcadia_weight = 1; - $sellItemModel->arcadia_id = 1; - $sellItemModel->type = SellItemsType::paper; - $sellItemModel->order = 1; - $sellItemModel->saveQuietly(); - - $sellItemModel = new SellItem(); - $sellItemModel->name = trans('CARTE DÉPART\'AIMANTS'); - $sellItemModel->picture = FileStorageHelper::storeFile( - $sellItemModel, - new \SplFileInfo(\resource_path('assets/images/club/shop/map.jpg')) - ); - $sellItemModel->picture_alt = trans('Carte départ\'aimants'); - $sellItemModel->picture_title = trans('Carte départ\'aimants magnétique'); - $sellItemModel->price = 12.00; - $sellItemModel->arcadia_weight = 2; - $sellItemModel->arcadia_id = 2; - $sellItemModel->type = SellItemsType::magnetic; - $sellItemModel->order = 2; - $sellItemModel->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - SellItem::query()->get()->map(function (SellItem $sellItem) { - $sellItem->deleteQuietly(); - }); - } -}; diff --git a/database/migrations/2024_21_27_123912_alter_tables_for_unit_tests.php b/database/migrations/2024_21_27_123912_alter_tables_for_unit_tests.php deleted file mode 100644 index 3fa272cd..00000000 --- a/database/migrations/2024_21_27_123912_alter_tables_for_unit_tests.php +++ /dev/null @@ -1,62 +0,0 @@ -renameColumn('publish_at', 'published_at'); - $table->renameColumn('unpublish_at', 'unpublished_at'); - }); - - Schema::table('historical_milestones', function (Blueprint $table) { - $table->tinyInteger('picto_position')->nullable()->comment('Historical milestone picto position.') - ->after('picto_title'); - $table->integer('order')->comment('Historical milestone order.')->after('published')->change(); - }); - HistoricalMilestone::query() - ->where('picto_placement', 'hg') - ->get() - ->map(function (HistoricalMilestone $historicalMilestoneModel) { - $historicalMilestoneModel->picto_position = HistoricalMilestonePosition::topLeft; - $historicalMilestoneModel->saveQuietly(); - }); - HistoricalMilestone::query() - ->where('picto_placement', 'hd') - ->get() - ->map(function (HistoricalMilestone $historicalMilestoneModel) { - $historicalMilestoneModel->picto_position = HistoricalMilestonePosition::topRight; - $historicalMilestoneModel->saveQuietly(); - }); - Schema::table('historical_milestones', function (Blueprint $table) { - $table->dropColumn('picto_placement'); - }); - - Schema::table('main_slides', function (Blueprint $table) { - $table->renameColumn('publish_at', 'published_at'); - $table->renameColumn('unpublish_at', 'unpublished_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - * @throws \Error Wont undo that. - */ - public function down(): void - { - throw new \Error('Wont undo that'); - } -}; diff --git a/database/migrations/2024_21_27_123913_add_OCB_breeders_table.php b/database/migrations/2024_21_27_123913_add_OCB_breeders_table.php deleted file mode 100644 index c36ac4c6..00000000 --- a/database/migrations/2024_21_27_123913_add_OCB_breeders_table.php +++ /dev/null @@ -1,37 +0,0 @@ -id()->comment('OCB breeder id.'); - $table->string('first_name')->comment('OCB breeder first name.'); - $table->string('last_name')->comment('OCB breeder last name.'); - $table->string('department')->comment('OCB breeder department.'); - $table->string('postal_code')->comment('OCB breeder postal code.'); - $table->tinyInteger('type')->comment('OCB breeder type.'); - $table->timestamp('created_at')->nullable()->comment('OCB breeder created at date.'); - $table->timestamp('updated_at')->nullable()->comment('OCB breeder updated at date.'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('ocb_breeders'); - } -}; diff --git a/database/migrations/2024_21_27_123913_add_search_type_static_pages_table.php b/database/migrations/2024_21_27_123913_add_search_type_static_pages_table.php deleted file mode 100644 index a2f1973d..00000000 --- a/database/migrations/2024_21_27_123913_add_search_type_static_pages_table.php +++ /dev/null @@ -1,44 +0,0 @@ -forceCreateQuietly( - [ - 'type' => StaticPageType::search, - 'seo_title' => sprintf('Seo title pour la page %s', StaticPageType::search->label()), - 'seo_description' => sprintf('Seo description pour la page %s', StaticPageType::search->label()), - 'title' => StaticPageType::search->label(), - 'slug' => Str::of(StaticPageType::search->label())->slug(), - 'subtitle' => null, - 'picture_alt' => null, - 'picture_title' => null, - 'picture' => null, - 'content' => null, - 'data' => [], - ] - ); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - DB::statement('DELETE FROM `static_pages` WHERE `type` LIKE "' . StaticPageType::search->value() . '"'); - } -}; diff --git a/database/migrations/2025_04_03_095319_add_static_page_game_rules.php b/database/migrations/2025_04_03_095319_add_static_page_game_rules.php deleted file mode 100644 index c37b1c7c..00000000 --- a/database/migrations/2025_04_03_095319_add_static_page_game_rules.php +++ /dev/null @@ -1,47 +0,0 @@ -type = StaticPageType::rules; - $staticPage->seo_title = trans( - 'SEO title pour la page :label', - ['label' => StaticPageType::rules->label()] - ); - $staticPage->seo_description = trans( - 'SEO description pour la page :label', - ['label' => StaticPageType::rules->label()] - ); - $staticPage->title = trans(StaticPageType::rules->label()); - $staticPage->slug = Str::of(StaticPageType::rules->label())->slug(); - $staticPage->subtitle = null; - $staticPage->picture = null; - $staticPage->picture_alt = null; - $staticPage->picture_title = null; - $staticPage->content = trans('Le contenu de votre page'); - $staticPage->data = []; - $staticPage->saveQuietly(); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - StaticPage::query()->where('type', StaticPageType::rules)->first()->delete(); - } -}; diff --git a/database/migrations/2025_06_05_100921_add_fields_to_offers_table.php b/database/migrations/2025_06_05_100921_add_fields_to_offers_table.php deleted file mode 100644 index b30c1b6b..00000000 --- a/database/migrations/2025_06_05_100921_add_fields_to_offers_table.php +++ /dev/null @@ -1,77 +0,0 @@ -string('title')->nullable()->comment('Offer title.')->change(); - $table->string('location')->nullable()->comment('Offer location.')->change(); - $table->text('location_details')->nullable()->comment('Offer location details.')->after('location'); - $table->string('location_latitude')->nullable()->comment('Offer location latitude.') - ->after('location_details'); - $table->string('location_longitude')->nullable()->comment('Offer location longitude.') - ->after('location_latitude'); - $table->string('contract')->nullable()->comment('Offer contract.')->change(); - $table->string('contract_period')->nullable()->comment('Offer contract period.')->after('contract'); - $table->string('function')->nullable()->comment('Offer function.')->change(); - $table->string('experience_level')->nullable()->comment('Offer experience level.')->after('function'); - $table->text('qualifications')->nullable()->comment('Offer qualifications.')->after('experience_level'); - $table->text('skills')->nullable()->comment('Offer skills.')->after('qualifications'); - $table->string('picture')->nullable()->comment('Offer picture.')->change(); - $table->string('picture_alt')->nullable()->comment('Picture alt attribute.')->change(); - $table->string('picture_title')->nullable()->comment('Picture title attribute.')->change(); - $table->string('link')->nullable()->comment('Offer link.')->change(); - $table->text('description')->nullable()->comment('Offer description.')->change(); - $table->string('recruiter_firstname')->nullable()->comment('Offer recruiter firstname.') - ->after('description'); - $table->string('recruiter_lastname')->nullable()->comment('Offer recruiter lastname.') - ->after('recruiter_firstname'); - $table->string('recruiter_job')->nullable()->comment('Offer recruiter job.')->after('recruiter_lastname'); - $table->string('recruiter_picture')->nullable()->comment('Offer recruiter picture.') - ->after('recruiter_job'); - $table->renameColumn('publish_at', 'published_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('offers', function (Blueprint $table) { - $table->string('title')->comment('Offer title.')->change(); - $table->string('location')->comment('Offer location.')->change(); - $table->dropColumn('location_details'); - $table->dropColumn('location_latitude'); - $table->dropColumn('location_longitude'); - $table->string('contract')->comment('Offer contract.')->change(); - $table->dropColumn('contract_period'); - $table->string('function')->comment('Offer function.')->change(); - $table->dropColumn('experience_level'); - $table->dropColumn('qualifications'); - $table->dropColumn('skills'); - $table->string('picture')->comment('Offer picture.')->change(); - $table->string('picture_alt')->comment('Picture alt attribute.')->change(); - $table->string('picture_title')->comment('Picture title attribute.')->change(); - $table->string('link')->comment('Picture link.')->change(); - $table->text('description')->comment('Offer description.')->change(); - $table->dropColumn('recruiter_firstname'); - $table->dropColumn('recruiter_lastname'); - $table->dropColumn('recruiter_job'); - $table->dropColumn('recruiter_picture'); - $table->renameColumn('published_at', 'publish_at'); - }); - } -}; diff --git a/database/migrations/2025_06_18_095049_add_offer_location_address_details_table.php b/database/migrations/2025_06_18_095049_add_offer_location_address_details_table.php deleted file mode 100644 index 58479f04..00000000 --- a/database/migrations/2025_06_18_095049_add_offer_location_address_details_table.php +++ /dev/null @@ -1,42 +0,0 @@ -dropColumn('location'); - $table->string('location_street')->nullable()->comment('Offer location street.')->after('title'); - $table->string('location_zip')->nullable()->comment('Offer location zip.')->after('location_street'); - $table->string('location_city')->nullable()->comment('Offer location city.')->after('location_zip'); - $table->string('location_state')->nullable()->comment('Offer location state.')->after('location_city'); - $table->string('location_country')->nullable()->comment('Offer location country.')->after('location_state'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('offers', function (Blueprint $table) { - $table->dropColumn('location_street'); - $table->dropColumn('location_zip'); - $table->dropColumn('location_city'); - $table->dropColumn('location_state'); - $table->dropColumn('location_country'); - $table->string('location')->nullable()->comment('Offer location.')->after('title'); - }); - } -}; diff --git a/database/migrations/2025_06_18_171424_change_associated_page_field_in_news_breedings_table.php b/database/migrations/2025_06_18_171424_change_associated_page_field_in_news_breedings_table.php deleted file mode 100644 index f344492d..00000000 --- a/database/migrations/2025_06_18_171424_change_associated_page_field_in_news_breedings_table.php +++ /dev/null @@ -1,65 +0,0 @@ -foreignId('static_page_id')->comment('News breeding associated static page.') - ->default(StaticPage::find(StaticPageType::getBreedingPages()[0])->getKey())->after('content') - ->constrained('static_pages')->onUpdate('cascade')->onDelete('cascade'); - }); - - NewsBreeding::get()->map(function (NewsBreeding $newsBreedingModel) { - $staticPageModel = StaticPage::query() - ->where('type', $newsBreedingModel->associated_page) - ->first(); - $newsBreedingModel->static_page_id = $staticPageModel->getKey(); - $newsBreedingModel->saveQuietly(); - }); - - Schema::table('news_breedings', function (Blueprint $table) { - $table->dropColumn('associated_page'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('news_breedings', function (Blueprint $table) { - $table->unsignedTinyInteger('associated_page') - ->default(StaticPage::find(StaticPageType::getBreedingPages()[0])->getKey()) - ->after('content') - ->comment('News breeding associated static page type.'); - }); - - NewsBreeding::get()->each(function (NewsBreeding $newsBreedingModel) { - $staticPage = StaticPage::find($newsBreedingModel->static_page_id); - if ($staticPage) { - $newsBreedingModel->associated_page = $staticPage->type->value(); - $newsBreedingModel->saveQuietly(); - } - }); - - Schema::table('news_breedings', function (Blueprint $table) { - $table->dropForeign(['static_page_id']); - $table->dropColumn('static_page_id'); - }); - } -}; diff --git a/database/migrations/2025_06_19_144056_add_ratings_table.php b/database/migrations/2025_06_19_144056_add_ratings_table.php deleted file mode 100644 index 961fbc3e..00000000 --- a/database/migrations/2025_06_19_144056_add_ratings_table.php +++ /dev/null @@ -1,37 +0,0 @@ -id(); - $table->foreignId('customer_id')->comment('Rating associated customer.')->constrained() - ->onUpdate('cascade')->onDelete('cascade'); - $table->unsignedBigInteger('rating_id')->comment('Rating key of the associated model.'); - $table->unsignedTinyInteger('rate')->comment('Rating note (Enum RatingEnum).'); - $table->string('rating_type')->comment('Rating associated model.'); - $table->timestamps(); - $table->unique(['customer_id', 'rating_id', 'rating_type']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::dropIfExists('ratings'); - } -}; diff --git a/database/migrations/2025_09_05_161808_alter_customerables_table.php b/database/migrations/2025_09_05_161808_alter_customerables_table.php deleted file mode 100644 index 2b515e6c..00000000 --- a/database/migrations/2025_09_05_161808_alter_customerables_table.php +++ /dev/null @@ -1,28 +0,0 @@ -timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('customerables', function (Blueprint $table) { - $table->dropTimestamps(); - }); - } -}; diff --git a/database/migrations/2025_11_07_093313_create_optin_consents_table.php b/database/migrations/2025_11_07_093313_create_optin_consents_table.php deleted file mode 100644 index db5f1681..00000000 --- a/database/migrations/2025_11_07_093313_create_optin_consents_table.php +++ /dev/null @@ -1,28 +0,0 @@ -id(); - $table->string('email')->unique(); - $table->string('hashcode')->unique(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('optin_consents'); - } -}; diff --git a/database/migrations/2026_02_20_133806_create_categories_approaches.php b/database/migrations/2026_02_20_133806_create_categories_approaches.php deleted file mode 100644 index 0ab56525..00000000 --- a/database/migrations/2026_02_20_133806_create_categories_approaches.php +++ /dev/null @@ -1,28 +0,0 @@ -id(); - $table->string('name'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('category_approaches'); - } -}; diff --git a/database/migrations/2026_02_20_134045_create_sections_approaches.php b/database/migrations/2026_02_20_134045_create_sections_approaches.php deleted file mode 100644 index d7b88867..00000000 --- a/database/migrations/2026_02_20_134045_create_sections_approaches.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->string('title'); - $table->text('content')->comment('content.'); - $table->string('picture')->comment('picture path.'); - $table->string('picture_alt')->comment('Picture alt attribute.'); - $table->string('picture_title')->comment('Picture title attribute.'); - $table->foreignId('category_id')->constrained('category_approaches')->cascadeOnDelete(); - $table->foreignId('page_id')->constrained('static_pages')->cascadeOnDelete(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('section_approaches'); - } -}; diff --git a/database/migrations/2026_03_03_092239_add_data_for_static_page_exit_outside.php b/database/migrations/2026_03_03_092239_add_data_for_static_page_exit_outside.php deleted file mode 100644 index f0ca39ef..00000000 --- a/database/migrations/2026_03_03_092239_add_data_for_static_page_exit_outside.php +++ /dev/null @@ -1,162 +0,0 @@ - [ - 'label' => 'Cahier de charge : Titre', - 'inputType' => 11, - 'value' => '', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'description' => [ - 'label' => 'Cahier de charge : Description', - 'inputType' => 12, - 'value' => '', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'picto' => [ - 'label' => 'Cahier de charge : Picto', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 90, - 'height' => 90 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'galery_title' => [ - 'label' => 'Slider : Titre', - 'inputType' => 11, - 'value' => '', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'slider_image_1' => [ - 'label' => 'Slider : Image 1', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 338, - 'height' => 222 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'slider_image_2' => [ - 'label' => 'Slider : Image 2', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 338, - 'height' => 222 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'slider_image_3' => [ - 'label' => 'Slider : Image 3', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 338, - 'height' => 222 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'slider_image_4' => [ - 'label' => 'Slider : Image 4', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 338, - 'height' => 222 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'nullable', - 'required' => false - ], - 'slider_image_5' => [ - 'label' => 'Slider : Image 5', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 338, - 'height' => 222 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'nullable', - 'required' => false - ], - 'slider_image_6' => [ - 'label' => 'Slider : Image 6', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 338, - 'height' => 222 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'nullable', - 'required' => false - ] - ]; - //SORTIR A L' EXTERIEUR - $staticPage = StaticPage::where('type', StaticPageType::exitOutside)->first(); - if ($staticPage) { - $staticPage->data = $data; - $staticPage->saveQuietly(); - } else { - StaticPage::query()->forceCreateQuietly( - [ - 'type' => StaticPageType::exitOutside->value(), - 'seo_title' => 'Démarche sortant à l\'extérieur', - 'seo_description' => 'Notre démarche inédite Le Gaulois "Sortant à l\'extérieur" s\'engage à ce que les volailles sortent', - 'title' => 'Démarche sortant à l\'extérieur', - 'slug' => 'demarche-sortant-a-l-exterieur', - 'data' => $data - - ] - ); - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('static_pages', function () { - $staticPage = StaticPage::query()->where('type', StaticPageType::exitOutside)->first(); - if ($staticPage) { - $staticPage->data = []; - $staticPage->saveQuietly(); - } - }); - } -}; diff --git a/database/migrations/2026_03_04_123521_add_data_to_static_page_oui_c_bon.php b/database/migrations/2026_03_04_123521_add_data_to_static_page_oui_c_bon.php deleted file mode 100644 index 4ce91342..00000000 --- a/database/migrations/2026_03_04_123521_add_data_to_static_page_oui_c_bon.php +++ /dev/null @@ -1,75 +0,0 @@ - [ - 'label' => 'Cahier de charge : Titre', - 'inputType' => 11, - 'value' => 'Notre cahier des charges', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'description' => [ - 'label' => 'Cahier de charge : Description', - 'inputType' => 12, - 'value' => '

Notre démarche inédite Le Gaulois ’’Sortant à l’extérieur’’ s’engage à ce que les volailles sortent à l’extérieur, tous les jours, dans les prés. Découvrez la démarche développée avec les éleveurs partenaires mobilisés chaque jour pour élever des volailles, nées et élevées en France.

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'picto' => [ - 'label' => 'Cahier de charge : Picto', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 90, - 'height' => 90 - ], - 'alt' => 'Description principale de la démarche.', - 'title' => 'titre cahier des charges', - 'value' => 'storage/modelfiles/static_pages/26/03/03/fa/e6764f38-69a6a058be95d.png', - 'validate' => 'required', - 'required' => true - ] - ]; - - $staticPage = StaticPage::where('type', StaticPageType::ouiCBon)->first(); - if ($staticPage) { - $staticPage->data = $data; - $staticPage->saveQuietly(); - } else { - StaticPage::query()->forceCreateQuietly( - [ - 'type' => StaticPageType::ouiCBon->value(), - 'seo_title' => 'Oui c\'est bon', - 'seo_description' => 'La marque 100% volaille française', - 'title' => 'Démarche Oui c\'est bon', - 'slug' => 'demarche-oui-c-est-bon', - 'data' => $data - ] - ); - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('static_pages', function () { - $staticPage = StaticPage::query()->where('type', StaticPageType::ouiCBon)->first(); - $staticPage->data = []; - $staticPage->saveQuietly(); - }); - } -}; diff --git a/database/migrations/2026_03_10_105432_add_data_by_default_to_static_page_our_farms.php b/database/migrations/2026_03_10_105432_add_data_by_default_to_static_page_our_farms.php deleted file mode 100644 index 466aace5..00000000 --- a/database/migrations/2026_03_10_105432_add_data_by_default_to_static_page_our_farms.php +++ /dev/null @@ -1,142 +0,0 @@ - [ - 'label' => 'Titre de la section', - 'inputType' => 11, - 'value' => '', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'card_title_1' => [ - 'label' => 'Démarche "Oui c\'est bon" : Titre', - 'inputType' => 11, - 'value' => '', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'card_description_1' => [ - 'label' => 'Démarche "Oui c\'est bon" : Description', - 'inputType' => 12, - 'value' => '', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'card_logo_1' => [ - 'label' => 'Démarche "Oui c\'est bon" : Picto', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 90, - 'height' => 90 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'card_image_1' => [ - 'label' => 'Démarche "Oui c\'est bon" : Image', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 528, - 'height' => 351 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'card_title_2' => [ - 'label' => 'Démarche "Sortant à l\'extérieur" : Titre', - 'inputType' => 11, - 'value' => '', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'card_description_2' => [ - 'label' => 'Démarche "Sortant à l\'extérieur" : Description', - 'inputType' => 12, - 'value' => '', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'card_logo_2' => [ - 'label' => 'Démarche "Sortant à l\'extérieur" : Picto', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 90, - 'height' => 90 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'card_image_2' => [ - 'label' => 'Démarche "Sortant à l\'extérieur" : Image', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 528, - 'height' => 214 - ], - 'alt' => '', - 'title' => '', - 'value' => '', - 'validate' => 'required', - 'required' => true - ] - ]; - - $staticPage = StaticPage::where('type', StaticPageType::ourFarms)->first(); - if ($staticPage) { - $staticPage->data = $data; - $staticPage->saveQuietly(); - } else { - StaticPage::query()->forceCreateQuietly([ - 'type' => StaticPageType::ourFarms->value(), - 'slug' => 'les-elevages', - 'seo_title' => sprintf('Seo title pour la page %s', StaticPageType::ourFarms->label()), - 'seo_description' => sprintf('Seo description pour la page %s', StaticPageType::ourFarms->label()), - 'title' => StaticPageType::ourFarms->label(), - 'subtitle' => 'sous-titre' . StaticPageType::ourFarms->label(), - 'picture_alt' => 'picture alt', - 'picture_title' => 'picture title', - 'picture' => FileStorageHelper::storeFile( - (new StaticPage()), - new \SplFileInfo(\resource_path( - '../database/factories/assets/static_pages/default-picture-720x405.jpg' - )) - ), - 'content' => \clean(\fake()->randomHtml()), - 'data' => $data, - ]); - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - $staticPage = StaticPage::where('type', StaticPageType::ourFarms)->first(); - if ($staticPage) { - $staticPage->data = []; - $staticPage->saveQuietly(); - } - } -}; diff --git a/database/migrations/2026_03_13_124146_add_data_for_breeding_static_page.php b/database/migrations/2026_03_13_124146_add_data_for_breeding_static_page.php deleted file mode 100644 index 34dc1454..00000000 --- a/database/migrations/2026_03_13_124146_add_data_for_breeding_static_page.php +++ /dev/null @@ -1,72 +0,0 @@ -map(fn($page) => $page->value)->toArray(); - - $pages = DB::table('static_pages') - ->whereIn('type', $breedingValues) - ->get(['id', 'data']); - - // check page that already have values - $existingCommonSection = null; - foreach ($pages as $page) { - $data = json_decode($page->data ?? '{}', true); - if (!empty($data['common_section']['title']) || !empty($data['common_section']['content'])) { - $existingCommonSection = $data['common_section']; - break; - } - } - // fallback solution if no pages have a value - $commonSection = $existingCommonSection ?? [ - 'title' => 'L’élevage des volailles', - 'content' => '

Face aux préoccupations des consommateurs sur le bien-être animal, Le Gaulois vous dit tout sur ses éleveurs partenaires et ses conditions d’élevages de volailles. -Chaque jour, nous collaborons avec les éleveurs partenaires engagés dans la démarche éthique et responsable pour améliorer le confort de nos volailles. Chez les éleveurs partenaires Le Gaulois, la protection animale ne cesse d’être l’enjeu majeur.

', - ]; - - // apply to all breeding pages - foreach ($pages as $page) { - $data = json_decode($page->data ?? '{}', true); - - if (!isset($data['common_section'])) { - $data['common_section'] = $commonSection; - - DB::table('static_pages') - ->where('id',$page->id) - ->update(['data' => json_encode($data)]); - } - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - $breedingValues = collect(StaticPageType::getBreedingPages()) - ->map(fn($page) => $page->value)->toArray(); - - $pages = DB::table('static_pages') - ->whereIn('type', $breedingValues) - ->get(['id', 'data']); - - foreach ($pages as $page) { - $data = json_decode($page->data ?? '{}', true); - unset($data['common_section']); - - DB::table('static_pages') - ->where('id',$page->id) - ->update(['data' => json_encode($data)]); - } - } -}; diff --git a/database/migrations/2026_04_28_124147_create_game_golden-crush_table.php b/database/migrations/2026_04_28_124147_create_game_golden-crush_table.php deleted file mode 100644 index 7477b91c..00000000 --- a/database/migrations/2026_04_28_124147_create_game_golden-crush_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->foreignId('customer_id')->constrained()->cascadeOnDelete(); - $table->unsignedTinyInteger('choice'); - $table->ipAddress('ip_address')->nullable(); - $table->timestamps(); - - $table->unique('customer_id'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('golden_crush_game'); - } -}; diff --git a/database/migrations/2026_04_30_115934_add_data_to_static_page_tdf.php b/database/migrations/2026_04_30_115934_add_data_to_static_page_tdf.php deleted file mode 100644 index 5a1e77e5..00000000 --- a/database/migrations/2026_04_30_115934_add_data_to_static_page_tdf.php +++ /dev/null @@ -1,643 +0,0 @@ - [ - 'label' => 'Titre de la page', - 'inputType' => InputType::string->value, - 'value' => 'Le Gaulois Le sponsor du Tour de France', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'highlight_text' => [ - 'label' => 'Texte de l\'encart', - 'inputType' => InputType::string->value, - 'value' => 'TOUR DE FRANCE 2025', - 'validate' => 'required|string|between:3,20', - 'required' => true - ], - 'banner_title' => [ - 'label' => 'Titre de la bannière', - 'inputType' => InputType::string->value, - 'value' => 'Le Gaulois en selle pour le tour de France', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'banner_text' => [ - 'label' => 'Texte de la bannière', - 'inputType' => InputType::text->value, - 'value' => '

Depuis 2015, Le Gaulois est fier d\'être la volaille officielle du Tour de France. Un évènement populaire marquant le début de la pause estivale qui s\'adresse à tous les Français, un rendez-vous immanquable pour des milliers de passionnés aux bords des routes ou devant leur télévision. La convivialité, le partage et la bonne humeur sont au rendez-vous et c\'est ce bon vivre à la française que la caravane Le Gaulois véhicule en sillonnant les routes de France chaque année. Des milliers de cadeaux sont distribués pour ravir les petits comme les plus grands. La participation à cet évènement est également l\'occasion de réaffirmer auprès du public, l\'engagement sur l\'origine 100% française des volailles Le Gaulois !

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'banner_picture' => [ - 'label' => 'Logo de la bannière', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 100, - 'height' => 300 - ], - 'alt' => 'Logo volaille officielle de Le Gaulois et le Tour de France', - 'title' => 'Logo volaille officielle de Le Gaulois et le Tour de France', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'banner_button_title' => [ - 'label' => 'Titre du bouton n°1', - 'inputType' => InputType::string->value, - 'value' => 'Le Gaulois et le Tour de France', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'banner_button_title_2' => [ - 'label' => 'Titre du bouton n°2', - 'inputType' => InputType::string->value, - 'value' => 'Au cœur de la caravane le Gaulois', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'banner_bgpicture' => [ - 'label' => 'Image de fond', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 720, - 'height' => 405, - ], - 'alt' => 'Image de fond', - 'title' => 'Image de fond', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'banner_picture_author' => [ - 'label' => 'Nom du photographe', - 'inputType' => InputType::string->value, - 'value' => 'Crédit photo - ASO Aurélien Vialatte', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'play_picture' => [ - 'label' => 'Logo de la section n°2', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 200, - 'height' => 125 - ], - 'alt' => '100% Gagnant', - 'title' => '100% Gagnant', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'play_title' => [ - 'label' => 'Titre de la section n°2', - 'inputType' => InputType::string->value, - 'value' => 'Jouez et tentez de gagner !', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'play_description' => [ - 'label' => 'Description de la section n°2', - 'inputType' => InputType::text->value, - 'value' => '

Participez à notre jeu 100% gagnant Le Gaulois pendant le Tour de France 2025.

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'play_btn_text' => [ - 'label' => 'Texte du bouton', - 'inputType' => InputType::string->value, - 'value' => 'Je tente ma chance !', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'play_btn_url' => [ - 'label' => 'Lien du bouton', - 'inputType' => InputType::url->value, - "value" => "https://www.legauloistourdefrance.fr", - "validate" => "required|string|url:http,https", - 'required' => true - ], - 'prize_title_1' => [ - 'label' => 'Texte du lot n°1', - 'inputType' => InputType::string->value, - 'value' => 'Ensembles TV + Home Cinema', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'prize_picture_1' => [ - 'label' => 'Image du lot n°1', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 130, - 'height' => 100 - ], - 'alt' => 'Ensemble TV-Home cinéma à gagner pendant le jeu TDF 100% gagnant Le Gaulois', - 'title' => '5 Ensembles TV-Home cinéma à gagner', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'prize_title_2' => [ - 'label' => 'Texte du lot n°2', - 'inputType' => InputType::string->value, - 'value' => 'Casques audios oreilles libres', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'prize_picture_2' => [ - 'label' => 'Image du lot n°2', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 130, - 'height' => 100 - ], - 'alt' => 'Casques audios oreilles libres à gagner pendant le jeu TDF 100% gagnant Le Gaulois', - 'title' => '40 Casques audios oreilles libres à gagner', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'prize_title_3' => [ - 'label' => 'Texte du lot n°3', - 'inputType' => InputType::string->value, - 'value' => 'Bons d\'achat', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'prize_picture_3' => [ - 'label' => 'Image du lot n°3', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 130, - 'height' => 100 - ], - 'alt' => 'Bons de réduction à gagner pendant le jeu TDF 100% gagnant Le Gaulois', - 'title' => 'Milliers de bons d\'achat à gagner', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - "play_display_section" => [ - "label" => "Afficher la section n°2", - "inputType" => InputType::boolean->value, - "value" => true, - "validate" => "required|boolean", - 'required' => true - ], - 'find_us_picture_1' => [ - 'label' => 'Image n°1 de la section n°3', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 300, - 'height' => 220 - ], - 'alt' => 'Chars de la caravane Le Gaulois', - 'title' => 'Caravane Le Gaulois au mileu des supporters du Tour de France', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'find_us_picture_2' => [ - 'label' => 'Image n°2 de la section n°3', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 300, - 'height' => 220 - ], - 'alt' => 'Char Cuisson Express Le Gaulois', - 'title' => 'Char cocotte Cuisson Express traversant un pont lors d\'une étape du Tour de France', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'find_us_picture' => [ - 'label' => 'Pictogramme de la section n°3', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 50, - 'height' => 70 - ], - 'alt' => 'Point d\'exclamation', - 'title' => 'Point d\'exclamation', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'find_us_title' => [ - 'label' => 'Titre de la section n°3', - 'inputType' => InputType::string->value, - 'value' => 'Venez nous retrouver sur le parcours du Tour de France', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'find_us_description' => [ - 'label' => 'Description de la section n°3', - 'inputType' => InputType::text->value, - 'value' => '

Participez à notre jeu 100% gagnant Le Gaulois pendant le Tour de France 2025.

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'find_us_btn_text_1' => [ - 'label' => 'Texte du bouton n°1', - 'inputType' => InputType::string->value, - 'value' => 'Télécharger la pancarte', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'find_us_btn_url_1' => [ - 'label' => 'Lien du bouton n°1', - 'inputType' => InputType::url->value, - "value" => "https://www.legaulois.fr/tdf-downloads/Pancarte.pdf", - "validate" => "required|string|url:http,https", - 'required' => true - ], - 'find_us_btn_text_2' => [ - 'label' => 'Texte du bouton n°2', - 'inputType' => InputType::string->value, - 'value' => 'Télécharger des coloriages', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'find_us_btn_url_2' => [ - 'label' => 'Lien du bouton n°2', - 'inputType' => InputType::url->value, - "value" => "https://www.legaulois.fr/tdf-downloads/COLORIAGE-Avril-2024.pdf", - "validate" => "required|string|url:http,https", - 'required' => true - ], - 'find_us_picture_author' => [ - 'label' => 'Nom du photographe', - 'inputType' => InputType::string->value, - 'value' => 'Crédit photo - ASO Aurélien Vialatte', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'tdf_title' => [ - 'label' => 'Titre de la section n°4', - 'inputType' => InputType::string->value, - 'value' => 'Le Gaulois et le Tour de France', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'tdf_subtitle_1' => [ - 'label' => 'Sous-titre n°1 de la section n°4', - 'inputType' => InputType::string->value, - 'value' => 'Plus de 10 années', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'tdf_subtitle_2' => [ - 'label' => 'Sous-titre n°2 de la section n°4', - 'inputType' => InputType::string->value, - 'value' => ' de complicité avec le public', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'tdf_description' => [ - 'label' => 'Description de la section n°4', - 'inputType' => InputType::text->value, - 'value' => '

Les chars « Cocottes » sont devenus emblématiques de la caravane du Tour de France. Dix-huit caravaniers passionnés, dont huit femmes et dix hommes de tous âges et venus de différentes régions de France, auront l\'opportunité unique de piloter les mythiques « Cocottes » à travers le pays. Représentant la diversité et l\'esprit de partage, ces caravaniers formeront une véritable famille pendant toute la durée du Tour, unis par leur amour du sport et leur engagement envers Le Gaulois.

Les huit chars Le Gaulois, représentant les produits phares de la marque, offrent au public l\'occasion de découvrir ou redécouvrir la diversité des produits proposés : Crousty Chicken, Oui c\'est Bon !, Cordon Bleu, Filets de Poulet Rôti, Blanc de Poulet Sortant à l\'Extérieur, et Le Filet de Poulet Tranché Cuisson Express seront à l\'honneur. Deux chars multiproduits, mettant en avant la diversité de la gamme, défileront également en tête de cortège avec à leur bord l\'animateur Arthur pour enflammer les foules gauloises. En fin de défilé, le char « Roule ma Poule » viendra clore le spectacle, un clin d\'œil toujours apprécié du public.

Les chars iront à la rencontre des Français pour distribuer plus de 600 000 goodies Le Gaulois dans une atmosphère joyeuse et conviviale. Cette année, la marque offrira des capes supporters, des magnets décapsuleurs, et des milliers de bons de réduction pour découvrir les produits Le Gaulois en magasin.

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'tdf_media' => [ - 'label' => 'Media de la section n°3', - 'inputType' => InputType::selectImageVideo->value, - 'value' => '', - 'validate' => 'required|array', - 'dimensions' => [ - 'width' => 620, - 'height' => 348 - ], - 'required' => true - ], - 'discover_title_1' => [ - 'label' => 'Titre n°1 de la section n°5', - 'inputType' => InputType::string->value, - 'value' => 'Découvrez', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'discover_title_2' => [ - 'label' => 'Titre n°2 de la section n°5', - 'inputType' => InputType::string->value, - 'value' => 'nos chars "cocottes"', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'discover_items' => [ - 'label' => 'Slider de la section n°5', - 'inputType' => InputType::slider->value, - 'value' => '', - 'validate' => 'required|array|between:2,10', - 'required' => true, - 'columns' => [ - [ - 'id' => 'picture', - 'type' => 'picture', - 'placeholder' => Str::ucFirst(__('validation.custom.picture')), - 'validation' => 'required', - 'required' => true - ], - [ - 'id' => 'picture_alt', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('crud.minicrud.picture_alt_label')), - 'validation' => 'required|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'picture_title', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('crud.minicrud.picture_title_label')), - 'validation' => 'required|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'subtitle', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('validation.custom.subtitle')), - 'validation' => 'sometimes|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'description', - 'type' => 'wysiwyg', - 'placeholder' => Str::ucFirst(__('validation.attributes.description')), - 'validation' => 'required|string|min:15', - 'required' => true - ], - ], - 'itemLimit' => [2, 10], - 'imageSizes' => [600, 450], - ], - 'heart_title' => [ - 'label' => 'Titre de la section n°6', - 'inputType' => InputType::string->value, - 'value' => 'Au cœur de la caravane Le Gaulois', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'heart_subtitle' => [ - 'label' => 'Sous-titre de la section n°6', - 'inputType' => InputType::string->value, - 'value' => 'Nos petites anecdotes', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'fun_facts_title_1' => [ - 'label' => 'Titre de l\'anecdote n°1', - 'inputType' => InputType::string->value, - 'value' => 'La caravane par tous les temps !', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'fun_facts_description_1' => [ - 'label' => 'Description de l\'anecdote n°1', - 'inputType' => InputType::text->value, - 'value' => '

Le 26 juillet 2019, lors de l\'étape Saint-Jean-de-Maurienne et Tignes, les chars terminent leur parade quand un orage de grêle s\'invite et entraîne une coulée de boue qui bloque la route et l\'accès aux cyclistes. L\'organisation décide l\'arrêt de l\'étape et marquera l\'histoire du Tour de France.

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'fun_facts_picture_1' => [ - 'label' => 'Pictogramme de l\'anecdote n°1', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 80, - 'height' => 80 - ], - 'alt' => 'Pictogramme d\'un soleil pour les anecdoctes météo sur le Tour de France', - 'title' => 'Pictogramme d\'un soleil', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'fun_facts_title_2' => [ - 'label' => 'Titre de l\'anecdote n°2', - 'inputType' => InputType::string->value, - 'value' => 'La transmission d\'une passion entre Père & Fils !', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'fun_facts_description_2' => [ - 'label' => 'Description de l\'anecdote n°2', - 'inputType' => InputType::text->value, - 'value' => '

Avec plus de 10 tours de France à son actif, Jean-Marie a transmis sa passion à son fils. Léo assure : « Sur le Tour, nous sommes collègues, mais il y a toujours cette fierté personnelle de partager ces moments ensemble sur les routes de France. ».

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'fun_facts_picture_2' => [ - 'label' => 'Pictogramme de l\'anecdote n°2', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 80, - 'height' => 80 - ], - 'alt' => 'Pictogramme d\'une tête d\'enfant pour les liens de parenté au sein de l\'équipe des caravaniers', - 'title' => 'Pictogramme d\'un enfant', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'fun_facts_title_3' => [ - 'label' => 'Titre de l\'anecdote n°3', - 'inputType' => InputType::string->value, - 'value' => 'Histoire de poulet', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'fun_facts_description_3' => [ - 'label' => 'Description de l\'anecdote n°3', - 'inputType' => InputType::text->value, - 'value' => '

Avec un sens de l\'humour aguerri, Cocotte rencontre un sympathique collègue au détour d\'un passage dans un village sur les routes du Tour de France.

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'fun_facts_picture_3' => [ - 'label' => 'Pictogramme de l\'anecdote n°3', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 80, - 'height' => 80 - ], - 'alt' => 'Pictogramme d\'un poulet policier pour les histoires poulets-policiers pendants le Tour de France', - 'title' => 'Pictogramme d\'un poulet policier', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'fun_facts_title_4' => [ - 'label' => 'Titre de l\'anecdote n°4', - 'inputType' => InputType::string->value, - 'value' => 'Un pompier en tant que chauffeur d\'un char Le Gaulois !', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'fun_facts_description_4' => [ - 'label' => 'Description de l\'anecdote n°4', - 'inputType' => InputType::text->value, - 'value' => '

Nicolas, pompier engagé, a procédé à une intervention de secours pour une jeune caravanière Le Gaulois. Depuis, Nicolas, rebaptisé Pimpon Le Gaulois, sillonne toujours les routes de France à bord d\'un char Cocotte.

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - 'fun_facts_picture_4' => [ - 'label' => 'Pictogramme de l\'anecdote n°4', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 80, - 'height' => 80 - ], - 'alt' => 'Pictogramme d\'une sirène d\'alarme pour les anecdoctes insolites pendant le Tour de France', - 'title' => 'Pictorgramme d\'une alarme', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'heart_picture' => [ - 'label' => 'Image de fond de la section n°6', - 'inputType' => 4, - 'dimensions' => [ - 'width' => 1020, - 'height' => 680 - ], - 'alt' => 'Char \'La crousty mobile\' qui traverse un village français pendant le Tour de France', - 'title' => 'Char de la caravane Le Gaulois', - 'value' => '', - 'validate' => 'required', - 'required' => true - ], - 'heart_picture_author' => [ - 'label' => 'Nom du photographe', - 'inputType' => InputType::string->value, - 'value' => 'Crédit photo - ASO Aurélien Vialatte', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'testimonials_title' => [ - 'label' => 'Titre de la section n°7', - 'inputType' => InputType::string->value, - 'value' => 'Les témoignages des caravaniers', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'testimonials_items' => [ - 'label' => 'Slider de la section n°7', - 'inputType' => InputType::slider->value, - 'value' => '', - 'validate' => 'required|array|between:2,6', - 'required' => true, - 'columns' => [ - [ - 'id' => 'picture', - 'type' => 'picture', - 'placeholder' => Str::ucFirst(__('validation.custom.picture')), - 'validation' => 'required', - 'required' => true - ], - [ - 'id' => 'picture_alt', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('crud.minicrud.picture_alt_label')), - 'validation' => 'required|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'picture_title', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('crud.minicrud.picture_title_label')), - 'validation' => 'required|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'picture_author', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('validation.custom.picture_author')), - 'validation' => 'required|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'title', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('validation.attributes.title')), - 'validation' => 'required|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'subtitle', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('validation.custom.subtitle')), - 'validation' => 'nullable|string|between:3,255', - 'required' => false - ], - [ - 'id' => 'description', - 'type' => 'wysiwyg', - 'placeholder' => Str::ucFirst(__('validation.attributes.description')), - 'validation' => 'required|string|min:15', - 'required' => true - ], - [ - 'id' => 'subtitle_2', - 'type' => 'text', - 'placeholder' => Str::ucFirst(__('validation.custom.subtitle')), - 'validation' => 'required|string|between:3,255', - 'required' => true - ], - [ - 'id' => 'description_2', - 'type' => 'wysiwyg', - 'placeholder' => Str::ucFirst(__('validation.attributes.description')), - 'validation' => 'required|string|min:15', - 'required' => true - ], - ], - 'itemLimit' => [2, 6], - 'imageSizes' => [500, 333], - ], - ]; - - $staticPage = StaticPage::where('type', StaticPageType::tdf)->first(); - if ($staticPage) { - $staticPage->data = $data; - $staticPage->saveQuietly(); - } else { - StaticPage::query()->forceCreateQuietly( - [ - 'type' => StaticPageType::tdf->value(), - 'seo_title' => 'Le Gaulois | Volaille officielle du Tour de France', - 'seo_description' => 'Immergez-vous dans l\'ambiance du Tour de France avec Le Gaulois. Découvrez le jeu concours, les photos, anecdotes et témoignages de notre équipe.', - 'title' => 'Le Gaulois Le sponsor du Tour de France', - 'slug' => 'tour-de-france', - 'data' => $data - ] - ); - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('static_pages', function () { - $staticPage = StaticPage::query()->where('type', StaticPageType::tdf)->first(); - $staticPage->data = []; - $staticPage->saveQuietly(); - }); - } -}; diff --git a/database/migrations/2026_05_07_144145_add_section_for_oui_c_bon_page.php b/database/migrations/2026_05_07_144145_add_section_for_oui_c_bon_page.php deleted file mode 100644 index 10a694c0..00000000 --- a/database/migrations/2026_05_07_144145_add_section_for_oui_c_bon_page.php +++ /dev/null @@ -1,58 +0,0 @@ - [ - 'label' => 'Rechercher un éleveur : Titre', - 'inputType' => 11, - 'value' => 'retrouvez tous nos éleveurs oui c\'est bon !', - 'validate' => 'required|string|between:3,255', - 'required' => true - ], - 'search_description' => [ - 'label' => 'Rechercher un éleveur : Description', - 'inputType' => 12, - 'value' => '

Parce que nous sommes fiers de notre savoir-faire français et de l\'origine France de nos produits, nous vous dévoilons les éleveurs partenaires et engagés au quotidien dans notre démarche Oui c\'est Bon Le Gaulois

', - 'validate' => 'required|string|min:15', - 'required' => true - ], - ]; - - $staticPage = StaticPage::where('type', StaticPageType::ouiCBon)->first(); - - if ($staticPage && !empty($staticPage->data)) { - $staticPage->data = array_merge($staticPage->data, $data); - $staticPage->saveQuietly(); - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - $staticPage = StaticPage::where('type', StaticPageType::ouiCBon)->first(); - - if ($staticPage && !empty($staticPage->data)) { - $data = $staticPage->data; - - unset( - $data['search_title'], - $data['search_description'] - ); - - $staticPage->data = $data; - $staticPage->saveQuietly(); - } - } -}; diff --git a/database/migrations/2026_06_10_130304_update_data_to_static_page_tdf.php b/database/migrations/2026_06_10_130304_update_data_to_static_page_tdf.php deleted file mode 100644 index 073c202e..00000000 --- a/database/migrations/2026_06_10_130304_update_data_to_static_page_tdf.php +++ /dev/null @@ -1,97 +0,0 @@ -items as $key => $old) { - if ($key === $target) { - $new[$new_key ?? $key] = $value; - } else { - $new[$key] = $old; - } - } - $this->items = $new; - }); - - Collection::macro('renameKey', function ($oldKey, $newKey) { - $new = []; - foreach ($this->items as $key => $value) { - $new[$key === $oldKey ? $newKey : $key] = $value; - } - $this->items = $new; - return $this; - }); - - Schema::table('static_page_tdf', function (Blueprint $table) { - $staticPageTdf = StaticPage::query()->where('type', StaticPageType::tdf)->first(); - if ($staticPageTdf) { - $data = collect($staticPageTdf->data); - - $data->renameKey('page_title', 'banner_page_title'); - $data->renameKey('highlight_text', 'banner_highlight_text'); - - $data->renameKey('heart_title', 'fun_facts_title'); - $data->renameKey('heart_subtitle', 'fun_facts_subtitle'); - $data->renameKey('heart_picture', 'fun_facts_picture'); - $data->renameKey('heart_picture_author', 'fun_facts_picture_author'); - - $data->renameKey('prize_title_1', 'play_prize_title_1'); - $data->renameKey('prize_picture_1', 'play_prize_picture_1'); - $data->renameKey('prize_title_2', 'play_prize_title_2'); - $data->renameKey('prize_picture_2', 'play_prize_picture_2'); - $data->renameKey('prize_title_3', 'play_prize_title_3'); - $data->renameKey('prize_picture_3', 'play_prize_picture_3'); - - $selectImageVideo = [ - 'label' => 'Media de la section n°4', - 'inputType' => InputType::selectImageVideo->value, - 'value' => [ - "video" => [ - "id" => "hY0WPbkf4Ow", - "alt" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", - "title" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." - ], - ], - 'validate' => 'required|array', - 'dimensions' => [ - 'width' => 620, - 'height' => 348 - ], - 'required' => true - ]; - - $data->replaceItem( - "tdf_media", - $selectImageVideo - ); - - $staticPageTdf->data = $data->all(); - $staticPageTdf->saveQuietly(); - } - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('static_page_tdf', function (Blueprint $table) { - // - }); - } -}; diff --git a/database/migrations/2030_01_01_000001_mandatory_seeds.php b/database/migrations/2030_01_01_000001_mandatory_seeds.php deleted file mode 100644 index 9d3be04a..00000000 --- a/database/migrations/2030_01_01_000001_mandatory_seeds.php +++ /dev/null @@ -1,20 +0,0 @@ - MandatorySeeder::class - ]); - } -}; diff --git a/database/migrations/2030_01_01_000002_development_seeds.php b/database/migrations/2030_01_01_000002_development_seeds.php deleted file mode 100644 index b23c9df2..00000000 --- a/database/migrations/2030_01_01_000002_development_seeds.php +++ /dev/null @@ -1,20 +0,0 @@ - DevelopmentSeeder::class - ]); - } -}; diff --git a/database/schema/mysql-schema.sql b/database/schema/mysql-schema.sql new file mode 100644 index 00000000..492ae003 --- /dev/null +++ b/database/schema/mysql-schema.sql @@ -0,0 +1,1362 @@ +/*M!999999\- enable the sandbox mode */ +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */; +DROP TABLE IF EXISTS `activity_logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `activity_logs` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint unsigned DEFAULT NULL COMMENT 'Id of the user associated, or nullable for a deleted user.', + `is_anonymous` tinyint(1) NOT NULL COMMENT 'If there is no user connected when action was realised.', + `is_console` tinyint(1) NOT NULL COMMENT 'If the action was realised in console.', + `model_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Target model.', + `model_id` int NOT NULL COMMENT 'Id of the target model.', + `event` int NOT NULL COMMENT 'Event of this activity (ActivityLogsEventEnum).', + `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'List of changes (old and new values).', + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'The date on which the user was published.', + PRIMARY KEY (`id`), + KEY `activity_logs_user_id_foreign` (`user_id`), + CONSTRAINT `activity_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL, + CONSTRAINT `activity_logs_chk_1` CHECK (json_valid(`data`)) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `approaches`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `approaches` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `type` tinyint unsigned NOT NULL COMMENT 'Approach type (label or demarche).', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Approach name.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Approach picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `button_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Approach button url (only for demarche).', + `published` tinyint(1) NOT NULL COMMENT 'Approach publication status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `block_lists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `block_lists` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `customer_id` bigint unsigned DEFAULT NULL, + `blocked_id` bigint unsigned DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `block_lists_customer_id_foreign` (`customer_id`), + KEY `block_lists_blocked_id_foreign` (`blocked_id`), + CONSTRAINT `block_lists_blocked_id_foreign` FOREIGN KEY (`blocked_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE, + CONSTRAINT `block_lists_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `brand_advantages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `brand_advantages` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Brand advantage title', + `sustitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Brand advantage sustitle', + `picto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Brand advantage pictogram', + `picto_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Pictogram alt attribute', + `picto_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Pictogram title attribute', + `text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Brand advantage text', + `is_large` tinyint(1) NOT NULL COMMENT 'Brand advantage block width', + `order` int NOT NULL COMMENT 'Brand advantage order', + `published` tinyint(1) NOT NULL COMMENT 'Brand advantage publish status', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `breeders`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `breeders` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `breeder_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `inuav_codes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `first_name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `last_name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture title attribute.', + `postal_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `department` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Breeder department - enum', + `place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `testimony` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `latitude` double NOT NULL, + `longitude` double NOT NULL, + `geo_type` smallint unsigned NOT NULL, + `ocbStatus` smallint unsigned NOT NULL, + `ocbType` smallint unsigned NOT NULL, + `audit` tinyint(1) NOT NULL, + `valid_marketing_date` date DEFAULT NULL, + `presentation_type` int NOT NULL DEFAULT '0', + `video_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `picture1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `picture2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `picture3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `approaches` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Array of associated approches', + `order` int unsigned NOT NULL COMMENT 'Breeder order', + `published` tinyint(1) NOT NULL DEFAULT '0', + `is_highlighted` tinyint(1) NOT NULL COMMENT 'Is the breeder highlighted ? (visible in carousel)', + `display_random` tinyint(1) NOT NULL DEFAULT '0', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `breeders_slug_unique` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `category_approaches`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `category_approaches` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `claims`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `claims` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Claim label.', + `published` tinyint(1) NOT NULL COMMENT 'Claim publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `consumption_moments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `consumption_moments` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The title of the consumption moment.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Consumption moment subtitle of the page.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Consumption moment title slug.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Consumption moment description of the page.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Consumption moment picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `customer_password_resets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `customer_password_resets` ( + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + KEY `csutomer_password_resets_email_index` (`email`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `customerables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `customerables` ( + `customer_id` bigint unsigned NOT NULL COMMENT 'The customer to associate.', + `customerable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `customerable_id` bigint unsigned NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + KEY `customerables_customer_id_foreign` (`customer_id`), + KEY `customerables_customerable_type_customerable_id_index` (`customerable_type`,`customerable_id`), + CONSTRAINT `customerables_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `customers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `customers` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Customer unique email.', + `hashcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Customer unique username.', + `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `email_verified_at` timestamp NULL DEFAULT NULL, + `last_connection` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `customers_email_unique` (`email`), + UNIQUE KEY `customers_username_unique` (`username`), + UNIQUE KEY `customers_hashcode_unique` (`hashcode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `delivery_addresses`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `delivery_addresses` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `firstname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Delivery address author firstname.', + `lastname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Delivery address author lastname.', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Delivery address address.', + `postcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Delivery address postcode.', + `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Delivery address author phone.', + `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Delivery address city.', + `civility` tinyint NOT NULL COMMENT 'Delivery address author civility.', + `order_id` bigint unsigned NOT NULL COMMENT 'Order associated to the delivery address.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `delivery_addresses_order_id_foreign` (`order_id`), + CONSTRAINT `delivery_addresses_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `demarche_slides`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `demarche_slides` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide title.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide picture title attribute.', + `button_1_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Slide button n°1 text.', + `button_1_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Slide button n°1 url.', + `button_2_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Slide button n°2 text.', + `button_2_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Slide button n°2 url.', + `text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide text content.', + `order` int NOT NULL COMMENT 'Slide order.', + `button_1_status` tinyint(1) NOT NULL COMMENT 'Slide button n°1 publish status.', + `button_1_target` tinyint(1) NOT NULL COMMENT 'Slide button n°1 target.', + `button_2_status` tinyint(1) NOT NULL COMMENT 'Slide button n°2 publish status.', + `button_2_target` tinyint(1) NOT NULL COMMENT 'Slide button n°2 target.', + `published` tinyint(1) NOT NULL COMMENT 'Slide publish status.', + `published_at` timestamp NULL DEFAULT NULL COMMENT 'Slide publishment date.', + `unpublished_at` timestamp NULL DEFAULT NULL COMMENT 'Slide unpublishment date.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `departaimants`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `departaimants` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `type` smallint unsigned NOT NULL, + `col1` bigint unsigned NOT NULL DEFAULT '0', + `col2` bigint unsigned NOT NULL DEFAULT '0', + `col3` bigint unsigned NOT NULL DEFAULT '0', + `col4` bigint unsigned NOT NULL DEFAULT '0', + `customer_id` bigint unsigned NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `departaimants_type_customer_id_unique` (`type`,`customer_id`), + KEY `departaimants_customer_id_foreign` (`customer_id`), + CONSTRAINT `departaimants_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `discounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `discounts` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Discount name.', + `desktop_image_available` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Discount desktop image available.', + `desktop_image_unavailable` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Discount desktop image unavailable.', + `mobile_image_available` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Discount mobile image available.', + `mobile_image_unavailable` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Discount mobile image unavailable.', + `code` bigint NOT NULL COMMENT 'Discount code.', + `value` double NOT NULL COMMENT 'Discount value.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `discounts_code_unique` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `failed_jobs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `failed_jobs` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `general_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `general_settings` ( + `type` tinyint unsigned NOT NULL COMMENT 'General settings enum type (SettingsType).', + `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'General settings value (json).', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + UNIQUE KEY `general_settings_type_unique` (`type`), + CONSTRAINT `general_settings_chk_1` CHECK (json_valid(`value`)) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `golden_crush_games`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `golden_crush_games` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `customer_id` bigint unsigned NOT NULL, + `choice` tinyint unsigned NOT NULL, + `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `golden_crush_games_customer_id_unique` (`customer_id`), + CONSTRAINT `golden_crush_games_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `historical_milestones`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `historical_milestones` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `year` year NOT NULL COMMENT 'Historical milestone year.', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Historical milestone title.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Historical milestone description.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Historical milestone picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture title attribute.', + `video_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Historical milestone video ID.', + `picto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Historical milestone picto.', + `picto_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture alt attribute.', + `picto_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture title attribute.', + `picto_position` tinyint DEFAULT NULL COMMENT 'Historical milestone picto position.', + `published` tinyint(1) NOT NULL COMMENT 'Historical milestone publish status.', + `order` int NOT NULL COMMENT 'Historical milestone order.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `inco_nutritional_values`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `inco_nutritional_values` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Inco id.', + `product_id` bigint unsigned DEFAULT NULL COMMENT 'Inco product id.', + `energy` double DEFAULT NULL COMMENT 'Inco energy value.', + `energy_kj` double DEFAULT NULL COMMENT 'Inco energy (kj) value.', + `protein` double DEFAULT NULL COMMENT 'Inco protein value.', + `carbohydrates` double DEFAULT NULL COMMENT 'Inco carbohydrates value.', + `sugar` double DEFAULT NULL COMMENT 'Inco sugar value.', + `fat` double DEFAULT NULL COMMENT 'Inco fat value.', + `saturated_fatty_acids` double DEFAULT NULL COMMENT 'Inco saturated fatty acids value.', + `dietary_fiber` double DEFAULT NULL COMMENT 'Inco dietary fiber value.', + `salt` double DEFAULT NULL COMMENT 'Inco salt value.', + `salt_percent` double(8,2) DEFAULT NULL COMMENT 'Inco salt percent.', + `energy_percent` double(8,2) DEFAULT NULL COMMENT 'Inco energy percent value.', + `energy_kj_percent` double(8,2) DEFAULT NULL COMMENT 'Inco energy (kj) percent value.', + `protein_percent` double(8,2) DEFAULT NULL COMMENT 'Inco protein percent value.', + `carbohydrates_percent` double(8,2) DEFAULT NULL COMMENT 'Inco carbohydrates percent value.', + `sugar_percent` double(8,2) DEFAULT NULL COMMENT 'Inco salt percent value.', + `fat_percent` double(8,2) DEFAULT NULL COMMENT 'Inco fat percent value.', + `saturated_fatty_acids_percent` double(8,2) DEFAULT NULL COMMENT 'Inco saturated fatty acids percent value.', + `dietary_fiber_percent` double(8,2) DEFAULT NULL COMMENT 'Inco dietary fiber percent value.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `inco_nutritional_values_product_id_foreign` (`product_id`), + CONSTRAINT `inco_nutritional_values_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `jobs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `jobs` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `queue` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `attempts` tinyint unsigned NOT NULL, + `reserved_at` int unsigned DEFAULT NULL, + `available_at` int unsigned NOT NULL, + `created_at` int unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `jobs_queue_index` (`queue`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `key_numbers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `key_numbers` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `picto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picto path.', + `picto_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picto alt attribute.', + `picto_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picto title attribute.', + `text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picto legend.', + `source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `order` int NOT NULL COMMENT 'Display order bo.', + `published` tinyint(1) NOT NULL COMMENT 'Picto publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `main_slides`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `main_slides` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide title.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide subtitle.', + `background` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Slide background.', + `background_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Background alt attribute.', + `background_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Background title attribute.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Slide picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture title attribute.', + `button_1_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Slide button n°1 text.', + `button_1_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Slide button n°1 url.', + `button_2_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Text of the button n°2 in the slide.', + `button_2_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Url of the button n°2 in the slide.', + `approach_id` bigint unsigned DEFAULT NULL, + `color_block` bigint unsigned NOT NULL COMMENT 'Slide block background color.', + `button_1_color_text` bigint unsigned NOT NULL COMMENT 'Slide button n°1 text color.', + `button_1_color_background` bigint unsigned NOT NULL COMMENT 'Slide button n°1 background color.', + `button_2_color_text` bigint unsigned NOT NULL COMMENT 'Slide button n°2 text color.', + `button_2_color_background` bigint unsigned NOT NULL COMMENT 'Slide button n°2 background color.', + `order` int NOT NULL COMMENT 'Slide order.', + `button_1_status` tinyint(1) NOT NULL COMMENT 'Slide button n°1 publish status.', + `button_1_target` tinyint(1) NOT NULL COMMENT 'Slide button n°1 target.', + `button_2_status` tinyint(1) NOT NULL COMMENT 'Slide button n°2 publish status.', + `button_2_target` tinyint(1) NOT NULL COMMENT 'Open the url of the button n°2 in a new tab.', + `new` tinyint(1) NOT NULL COMMENT 'Slide picto new.', + `published` tinyint(1) NOT NULL COMMENT 'Slide publish status.', + `published_at` timestamp NULL DEFAULT NULL COMMENT 'Slide publishment date.', + `unpublished_at` timestamp NULL DEFAULT NULL COMMENT 'Slide unpublishment date.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `main_slides_approach_id_foreign` (`approach_id`), + CONSTRAINT `main_slides_approach_id_foreign` FOREIGN KEY (`approach_id`) REFERENCES `approaches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `meats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `meats` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Meat label.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Meat subtitle of the page.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Meat slug.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Meat description.', + `banner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Meat banner', + `banner_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Banner alt attribute', + `banner_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Banner title attribute', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Meat picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `color` bigint unsigned NOT NULL COMMENT 'Meat associated color.', + `order` int NOT NULL COMMENT 'Meat order', + `published` tinyint(1) NOT NULL COMMENT 'Meat publish status', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `menu_node_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `menu_node_data` ( + `type` smallint unsigned NOT NULL COMMENT 'Enum MenuNodeType, this is unique since we do not use this for links.', + `sub_label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Left part) Link label', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Sub title', + `text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Sub text', + `text_color` bigint unsigned NOT NULL COMMENT '(Right part) Sub text color', + `link_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Link url', + `link_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Link title', + `link_target` tinyint(1) NOT NULL COMMENT '(Right part) Link target', + `link_status` tinyint(1) NOT NULL COMMENT '(Right part) Link status', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Picture', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Picture alt text', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Picture title text', + `picture_status` tinyint(1) NOT NULL COMMENT '(Right part) Picture status', + `background_picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Menu picture', + `background_picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Menu picture alt text', + `background_picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '(Right part) Menu picture title text', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `messages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `messages` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `hide_from` tinyint(1) NOT NULL DEFAULT '0', + `hide_to` tinyint(1) NOT NULL DEFAULT '0', + `from` bigint unsigned DEFAULT NULL, + `to` bigint unsigned DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `messages_from_foreign` (`from`), + KEY `messages_to_foreign` (`to`), + CONSTRAINT `messages_from_foreign` FOREIGN KEY (`from`) REFERENCES `customers` (`id`) ON DELETE CASCADE, + CONSTRAINT `messages_to_foreign` FOREIGN KEY (`to`) REFERENCES `customers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `migrations` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `batch` int NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `news`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `news` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `seo_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The seo title of the news.', + `seo_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The seo description of the news.', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The title of the news.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'The title of the news.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture path.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `thumbnail` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Thumbnail path.', + `thumbnail_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Thumbnail alt attribute.', + `thumbnail_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Thumbnail title attribute.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Unique title slug', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The content of the news.', + `news_category_id` bigint unsigned NOT NULL, + `highlight` tinyint(1) NOT NULL COMMENT 'Highlight status.', + `published` tinyint(1) NOT NULL COMMENT 'News publish status.', + `publish_at` timestamp NULL DEFAULT NULL COMMENT 'News publishment date.', + `unpublish_at` timestamp NULL DEFAULT NULL COMMENT 'News unpublishment date.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `news_slug_unique` (`slug`), + KEY `news_news_category_id_foreign` (`news_category_id`), + CONSTRAINT `news_news_category_id_foreign` FOREIGN KEY (`news_category_id`) REFERENCES `news_categories` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `news_breedings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `news_breedings` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `seo_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The seo title of the news breeding.', + `seo_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The seo description of the news breeding.', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The title of the news breeding.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'The title of the news breeding.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture path.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Unique title slug', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The content of the news breeding.', + `static_page_id` bigint unsigned NOT NULL DEFAULT '16' COMMENT 'News breeding associated static page.', + `order` int NOT NULL COMMENT 'News breeding order', + `published` tinyint(1) NOT NULL COMMENT 'News breeding publish status.', + `publish_at` timestamp NULL DEFAULT NULL COMMENT 'News breeding publishment date.', + `unpublish_at` timestamp NULL DEFAULT NULL COMMENT 'News breeding unpublishment date.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `news_breedings_static_page_id_foreign` (`static_page_id`), + CONSTRAINT `news_breedings_static_page_id_foreign` FOREIGN KEY (`static_page_id`) REFERENCES `static_pages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `news_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `news_categories` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `seo_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The seo title of the news category.', + `seo_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The seo description of the news category.', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'News category title.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'News category title slug.', + `color` bigint unsigned NOT NULL COMMENT 'News associated color.', + `order` int NOT NULL COMMENT 'News category order.', + `published` tinyint(1) NOT NULL COMMENT 'News category publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `news_categories_slug_unique` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `news_clubs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `news_clubs` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'News club title.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'News club title slug.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'News club picture path.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'News club content.', + `type` int NOT NULL COMMENT 'News club type.', + `multiple_answers` tinyint(1) NOT NULL COMMENT 'News club multiple answers.', + `published` tinyint(1) NOT NULL COMMENT 'News club publish status.', + `publish_at` timestamp NULL DEFAULT NULL COMMENT 'News club publishment date.', + `unpublish_at` timestamp NULL DEFAULT NULL COMMENT 'News club unpublishment date.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `news_clubs_slug_unique` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `news_corporates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `news_corporates` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The title of the news.', + `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The content of the news.', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Linkedin url link.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture path.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `published` tinyint(1) NOT NULL COMMENT 'News publish status.', + `publish_at` timestamp NULL DEFAULT NULL COMMENT 'Slide publishment date.', + `unpublish_at` timestamp NULL DEFAULT NULL COMMENT 'Slide unpublishment date.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notifications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `notifications` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `type` tinyint NOT NULL, + `notifiable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `notifiable_id` bigint unsigned NOT NULL, + `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `customer_id` bigint unsigned DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`), + KEY `notifications_customer_id_foreign` (`customer_id`), + CONSTRAINT `notifications_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notifications_read`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `notifications_read` ( + `notification_id` bigint unsigned NOT NULL, + `customer_id` bigint unsigned NOT NULL, + PRIMARY KEY (`notification_id`,`customer_id`), + KEY `notifications_read_customer_id_foreign` (`customer_id`), + CONSTRAINT `notifications_read_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`), + CONSTRAINT `notifications_read_notification_id_foreign` FOREIGN KEY (`notification_id`) REFERENCES `notifications` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ocb_breeders`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ocb_breeders` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'OCB breeder id.', + `first_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'OCB breeder first name.', + `last_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'OCB breeder last name.', + `department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'OCB breeder department.', + `postal_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'OCB breeder postal code.', + `type` tinyint NOT NULL COMMENT 'OCB breeder type.', + `created_at` timestamp NULL DEFAULT NULL COMMENT 'OCB breeder created at date.', + `updated_at` timestamp NULL DEFAULT NULL COMMENT 'OCB breeder updated at date.', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `offers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `offers` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer title.', + `location_street` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer location street.', + `location_zip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer location zip.', + `location_city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer location city.', + `location_state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer location state.', + `location_country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer location country.', + `location_details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Offer location details.', + `location_latitude` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer location latitude.', + `location_longitude` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer location longitude.', + `contract` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer contract.', + `contract_period` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer contract period.', + `function` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer function.', + `experience_level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer experience level.', + `qualifications` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Offer qualifications.', + `skills` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Offer skills.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture title attribute.', + `link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer link.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Offer description.', + `recruiter_firstname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer recruiter firstname.', + `recruiter_lastname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer recruiter lastname.', + `recruiter_job` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer recruiter job.', + `recruiter_picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Offer recruiter picture.', + `published` tinyint(1) NOT NULL COMMENT 'Offer publish status.', + `published_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Slide publishment date.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `optin_consents`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `optin_consents` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `hashcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `optin_consents_email_unique` (`email`), + UNIQUE KEY `optin_consents_hashcode_unique` (`hashcode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `order_sell_item`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `order_sell_item` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `quantity` smallint NOT NULL COMMENT 'Order sell items quantity.', + `order_id` bigint unsigned NOT NULL COMMENT 'Order associated to the sell item.', + `sell_item_id` bigint unsigned NOT NULL COMMENT 'Sell item associated to the order.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `order_sell_item_order_id_foreign` (`order_id`), + KEY `order_sell_item_sell_item_id_foreign` (`sell_item_id`), + CONSTRAINT `order_sell_item_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `order_sell_item_sell_item_id_foreign` FOREIGN KEY (`sell_item_id`) REFERENCES `sell_items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `orders`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `orders` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `ref` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Order reference.', + `firstname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Order firstname author.', + `lastname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Order lastname author.', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Order address author.', + `postcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Order postcode author.', + `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Order phone author.', + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Order email author.', + `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Order city author.', + `civility` tinyint NOT NULL COMMENT 'Order civility author.', + `status` tinyint NOT NULL COMMENT 'Order status.', + `payementType` tinyint NOT NULL COMMENT 'Order payement type.', + `confirmMailSent` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Order sent mail confirm.', + `customer_id` bigint unsigned NOT NULL COMMENT 'Customer associated to the order.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `orders_ref_unique` (`ref`), + KEY `orders_customer_id_foreign` (`customer_id`), + CONSTRAINT `orders_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `password_resets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `password_resets` ( + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + KEY `password_resets_email_index` (`email`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `product_types`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `product_types` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product type description.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product type description.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product type picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `button_status` tinyint(1) NOT NULL COMMENT 'Product type button publish status.', + `published` tinyint(1) NOT NULL COMMENT 'Product type publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `productables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `productables` ( + `product_id` bigint unsigned NOT NULL COMMENT 'The product to associate', + `productable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `productable_id` bigint unsigned NOT NULL, + KEY `productables_product_id_foreign` (`product_id`), + KEY `productables_productable_type_productable_id_index` (`productable_type`,`productable_id`), + CONSTRAINT `productables_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `products`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `products` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `seo_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Product seo title.', + `seo_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Product seo description.', + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product label.', + `claim_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'The claim title for a product.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product slug.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `banner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `banner_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `banner_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `packaging` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product packaging.', + `packaging_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Packaging alt attribute.', + `packaging_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Packaging title attribute.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product description.', + `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product details.', + `preparation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product preparation.', + `ingredients` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Product ingrédients.', + `meat_id` bigint unsigned DEFAULT NULL COMMENT 'Product meat.', + `submeat_id` bigint unsigned DEFAULT NULL COMMENT 'Product submeat.', + `range_id` bigint unsigned DEFAULT NULL COMMENT 'Product range.', + `subrange_id` bigint unsigned DEFAULT NULL COMMENT 'Product subrange.', + `approach_id` bigint unsigned DEFAULT NULL COMMENT 'Product approach (demarche).', + `new` tinyint(1) DEFAULT NULL COMMENT 'Product new.', + `discover` tinyint(1) NOT NULL COMMENT 'Product discover.', + `published` tinyint(1) NOT NULL COMMENT 'Product publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `products_approach_id_foreign` (`approach_id`), + KEY `products_meat_id_foreign` (`meat_id`), + KEY `products_submeat_id_foreign` (`submeat_id`), + KEY `products_range_id_foreign` (`range_id`), + KEY `products_subrange_id_foreign` (`subrange_id`), + CONSTRAINT `products_approach_id_foreign` FOREIGN KEY (`approach_id`) REFERENCES `approaches` (`id`) ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `products_meat_id_foreign` FOREIGN KEY (`meat_id`) REFERENCES `meats` (`id`) ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `products_range_id_foreign` FOREIGN KEY (`range_id`) REFERENCES `ranges` (`id`) ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `products_submeat_id_foreign` FOREIGN KEY (`submeat_id`) REFERENCES `submeats` (`id`) ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `products_subrange_id_foreign` FOREIGN KEY (`subrange_id`) REFERENCES `subranges` (`id`) ON DELETE SET NULL ON UPDATE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `professions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `professions` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Profession title.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Profession picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `jobs_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Profession list of jobs.', + `job_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Digital recruiters url.', + `published` tinyint(1) NOT NULL COMMENT 'Profession publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ranges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ranges` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Range label.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Range subtitle of the page.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Range slug.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Range description.', + `banner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Range banner', + `banner_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Banner alt attribute', + `banner_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Banner title attribute', + `banner_ambiance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Range ambiance banner', + `banner_ambiance_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Ambiance banner alt attribute', + `banner_ambiance_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Ambiance banner title attribute', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Range picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `color` bigint unsigned NOT NULL COMMENT 'Range associated color.', + `order` int NOT NULL COMMENT 'Range order', + `published` tinyint(1) NOT NULL COMMENT 'Range publish status', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ratings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ratings` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `customer_id` bigint unsigned NOT NULL COMMENT 'Rating associated customer.', + `rating_id` bigint unsigned NOT NULL COMMENT 'Rating key of the associated model.', + `rate` tinyint unsigned NOT NULL COMMENT 'Rating note (Enum RatingEnum).', + `rating_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Rating associated model.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `ratings_customer_id_rating_id_rating_type_unique` (`customer_id`,`rating_id`,`rating_type`), + CONSTRAINT `ratings_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `recipes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `recipes` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `seo_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Recipe seo title.', + `seo_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Recipe seo description.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Recipe slug.', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Recipe title.', + `tips` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Recipe picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `ingredients_list` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'Recipe list of ingredients.', + `preparation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Recipe preparation.', + `advice` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `video_id` bigint unsigned DEFAULT NULL COMMENT 'Recipe video.', + `consumption_moment_id` bigint unsigned NOT NULL COMMENT 'Recipe consumption moment.', + `preparation_time` smallint unsigned NOT NULL COMMENT 'Recipe preparation time.', + `cooking_time` smallint unsigned DEFAULT NULL, + `nb_guests` smallint unsigned NOT NULL COMMENT 'Number of reference persons for ingredient list of the recipe.', + `difficulty` tinyint unsigned NOT NULL COMMENT 'Recipe difficulty.', + `highlight` tinyint(1) NOT NULL COMMENT 'Recipe highlight.', + `published` tinyint(1) NOT NULL COMMENT 'Recipe publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `recipes_video_id_foreign` (`video_id`), + KEY `recipes_consumption_moment_id_foreign` (`consumption_moment_id`), + CONSTRAINT `recipes_consumption_moment_id_foreign` FOREIGN KEY (`consumption_moment_id`) REFERENCES `consumption_moments` (`id`), + CONSTRAINT `recipes_video_id_foreign` FOREIGN KEY (`video_id`) REFERENCES `videos` (`id`), + CONSTRAINT `recipes_chk_1` CHECK (json_valid(`ingredients_list`)) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `saml2_tenants`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `saml2_tenants` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `uuid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `idp_entity_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `idp_login_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `idp_logout_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `idp_x509_cert` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `relay_state_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `name_id_format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'persistent', + PRIMARY KEY (`id`), + CONSTRAINT `saml2_tenants_chk_1` CHECK (json_valid(`metadata`)) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `section_approaches`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `section_approaches` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'content.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'picture path.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `category_id` bigint unsigned NOT NULL, + `page_id` bigint unsigned NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `section_approaches_category_id_foreign` (`category_id`), + KEY `section_approaches_page_id_foreign` (`page_id`), + CONSTRAINT `section_approaches_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `category_approaches` (`id`) ON DELETE CASCADE, + CONSTRAINT `section_approaches_page_id_foreign` FOREIGN KEY (`page_id`) REFERENCES `static_pages` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `sell_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `sell_items` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Sell item id.', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Sell item name.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Sell item picture path.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `price` double NOT NULL COMMENT 'Sell item price.', + `arcadia_weight` smallint NOT NULL DEFAULT '0' COMMENT 'Sell item arcadia weight.', + `arcadia_id` int NOT NULL COMMENT 'Sell item arcadia id.', + `order` int NOT NULL COMMENT 'Sell item order', + `type` tinyint NOT NULL DEFAULT '1' COMMENT 'Sell item type.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sell_items_arcadia_id_unique` (`arcadia_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `static_pages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `static_pages` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `type` tinyint unsigned NOT NULL COMMENT 'Page type (StaticPageEnum)', + `seo_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Static page SEO title.', + `seo_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Static page SEO description.', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Static page title.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Unique title slug', + `subtitle` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Static page subtitle.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Static page picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Picture title attribute.', + `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Static page content.', + `data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Static page data.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `static_pages_type_unique` (`type`), + UNIQUE KEY `static_pages_slug_unique` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `submeats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `submeats` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Submeat label.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Submeat subtitle of the page.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Submeat slug.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Submeat description.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Submeat picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `meat_id` bigint unsigned NOT NULL COMMENT 'Associated meat', + `order` int NOT NULL COMMENT 'Submeat order', + `published` tinyint(1) NOT NULL COMMENT 'Submeat publish status', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `submeats_meat_id_foreign` (`meat_id`), + CONSTRAINT `submeats_meat_id_foreign` FOREIGN KEY (`meat_id`) REFERENCES `meats` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `subranges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `subranges` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Subrange label.', + `subtitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Subrange subtitle of the page.', + `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Subrange slug.', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Subrange description.', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Subrange picture.', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture alt attribute.', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Picture title attribute.', + `range_id` bigint unsigned NOT NULL COMMENT 'Associated range', + `order` int NOT NULL COMMENT 'Subrange order', + `published` tinyint(1) NOT NULL COMMENT 'Subrange publish status', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `subranges_range_id_foreign` (`range_id`), + CONSTRAINT `subranges_range_id_foreign` FOREIGN KEY (`range_id`) REFERENCES `ranges` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `surveys_answers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `surveys_answers` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `news_club_id` bigint unsigned NOT NULL COMMENT 'Survey answer news club associated.', + `order` int NOT NULL COMMENT 'Survey answer order.', + `published` tinyint(1) NOT NULL COMMENT 'Survey answer status.', + `answer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Survey answer.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `surveys_answers_news_club_id_foreign` (`news_club_id`), + CONSTRAINT `surveys_answers_news_club_id_foreign` FOREIGN KEY (`news_club_id`) REFERENCES `news_clubs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `telescope_entries`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `telescope_entries` ( + `sequence` bigint unsigned NOT NULL AUTO_INCREMENT, + `uuid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `batch_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `family_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `should_display_on_index` tinyint(1) NOT NULL DEFAULT '1', + `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`sequence`), + UNIQUE KEY `telescope_entries_uuid_unique` (`uuid`), + KEY `telescope_entries_batch_id_index` (`batch_id`), + KEY `telescope_entries_family_hash_index` (`family_hash`), + KEY `telescope_entries_created_at_index` (`created_at`), + KEY `telescope_entries_type_should_display_on_index_index` (`type`,`should_display_on_index`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `telescope_entries_tags`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `telescope_entries_tags` ( + `entry_uuid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`entry_uuid`,`tag`), + KEY `telescope_entries_tags_tag_index` (`tag`), + CONSTRAINT `telescope_entries_tags_entry_uuid_foreign` FOREIGN KEY (`entry_uuid`) REFERENCES `telescope_entries` (`uuid`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `telescope_monitoring`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `telescope_monitoring` ( + `tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`tag`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `testimonials`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `testimonials` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `catchline` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Testimonial catchline', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Testimonial content', + `identity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Identity of the person', + `job` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Job of the person', + `picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Path of the picture of the testimonial (550x315)', + `picture_alt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Alt attribute of the picture', + `picture_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Title attribute of the picture', + `video_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Id of the video to display (youtube)', + `order` int NOT NULL COMMENT 'Testimonial order.', + `published` tinyint(1) NOT NULL COMMENT 'Testimonial publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'First name of the user.', + `last_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Last name of the user.', + `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Email of the user.', + `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `role` tinyint unsigned NOT NULL COMMENT 'Role of the user who defines the rights/access.', + `last_connection` date DEFAULT NULL, + `published` tinyint(1) NOT NULL COMMENT 'The user is acivated or not.', + `published_at` timestamp NULL DEFAULT NULL COMMENT 'The date on which the user was activated.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `users_email_unique` (`email`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `uwil_redirections`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `uwil_redirections` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Hash of the redirection (from old_query).', + `old_model_slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Old slug of the model.', + `old_query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Old URL.', + `new_query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'New URL to redirect.', + `model_redirectable_id` bigint unsigned NOT NULL COMMENT 'Primary key of the model.', + `model_redirectable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Class of the model.', + `redirect_type` tinyint unsigned NOT NULL COMMENT 'Type of the redirection (enum RedirectionType).', + `redirect_code` smallint unsigned NOT NULL COMMENT 'HTTP Code of the redirection (enum RedirectionCode).', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `uwil_redirections_hash` (`hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `videos`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `videos` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Video title.', + `video_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The video ID.', + `is_on_homepage` tinyint(1) NOT NULL COMMENT 'Is display on homepage ?', + `product_id` bigint unsigned DEFAULT NULL COMMENT 'Associated product', + `order` int NOT NULL COMMENT 'Video order.', + `published` tinyint(1) NOT NULL COMMENT 'Video publish status.', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `videos_product_id_foreign` (`product_id`), + CONSTRAINT `videos_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*M!100616 SET NOTE_VERBOSITY=@OLD_NOTE_VERBOSITY */; + +/*M!999999\- enable the sandbox mode */ +SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0; +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_000000_create_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2014_10_12_100000_create_password_resets_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2019_08_19_000000_create_failed_jobs_table',3); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4,'2021_11_19_102529_create_jobs_table',4); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2023_09_08_102717_create_actitivy_logs_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2023_10_19_094711_create_static_pages',6); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2024_03_27_163722_create_brand_advantages_table',7); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (8,'2024_03_27_165252_create_professions_table',8); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (9,'2024_03_29_092817_create_key_numbers_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (10,'2024_04_04_115045_create_demarche_slides_table',10); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (13,'2024_04_11_155435_create_ranges_table',13); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2024_04_11_161238_create_subranges_table',14); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2024_04_11_162113_create_meats_table',15); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (16,'2024_04_11_162347_create_submeats_table',16); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (17,'2024_04_12_084956_create_approaches_table',17); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (18,'2024_04_12_094030_create_products_table',18); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (19,'2024_04_12_095316_create_productables_table',19); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2024_04_13_115045_create_main_slides_table',20); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2030_01_01_000001_mandatory_seeds',21); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2024_04_08_100253_create_general_settings_table',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2024_04_11_093924_create_menu_node_data_table',23); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2024_04_25_151849_create_consumption_moments_table',24); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2024_04_29_164213_create_video_table',25); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2024_04_29_171346_create_recipes_table',26); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2030_01_01_000002_development_seeds',27); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29,'2024_05_22_162212_alter_consumption_moment_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (30,'2024_05_30_123252_add_picture_to_static_pages_table',29); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (31,'2024_06_06_161707_create_product_types_table',30); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (32,'2024_06_10_122602_create_claims_table',31); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (33,'2024_06_10_141752_alter_products_table',32); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (34,'2024_06_11_112251_add_products_to_general_settings_table',33); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (35,'2024_06_12_103004_create_inco_nutritional_values_table',34); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (38,'2024_06_12_122730_clean_database_for_re7',35); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (39,'2024_06_13_101337_alter_images_products_table',36); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (40,'2024_06_13_104248_add_slug_products_table',37); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (41,'2024_06_13_142049_alter_relations_products_table',38); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2024_06_13_164818_add_published_product_types_table',39); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (43,'2024_06_20_125638_alter_routes_general_settings_table',40); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (44,'2024_06_26_170458_add_button_link_demarches_table',41); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (45,'2024_06_26_175000_add_subtitle_and_text_to_models_for_index_pages',42); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (46,'2024_07_01_101346_create_customer_password_resets_table',43); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (47,'2024_07_01_101346_create_customers_table',44); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (48,'2024_07_05_150846_add_date_fileds_on_customers',45); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2024_07_05_150846_add_soft_delete_to_customers',46); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (50,'2024_07_05_150846_rename_table_csutomer_password_resets_to_customer_password_resets',47); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (51,'2024_07_05_155210_add_password_to_customer',48); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (52,'2024_07_10_111948_create_historical_milestones_table',49); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2024_07_10_153957_add_minicrud_static_pages_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2024_07_11_115612_add_seo_fields_to_products_and_recipes_table',51); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2024_07_12_115553_create_offers_table',52); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2024_12_02_141232_create_departaimants_table',53); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (57,'2024_12_09_112347_create_messages_table',54); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (58,'2024_12_10_171912_create_block_lists_table',55); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2024_12_24_160304_create_notifications',56); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (60,'2024_12_24_161902_create_notifications_read',57); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2024_12_24_171920_add_customer_id_to_notifications_table',58); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (62,'2024_12_24_171921_update_relations_options_products_table',59); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (63,'2024_12_25_104803_add_fields_to_static_page_offers_table',60); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (64,'2024_12_25_175858_add_published_at_offers_table',61); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2024_12_25_175900_add_count_offers_from_job_general_settings_table',62); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (66,'2024_12_26_114011_add_link_offers_table',63); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (67,'2024_07_25_122152_create_testimonials_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (68,'2024_07_31_092856_create_news_corporates_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (69,'2024_08_06_160317_add_selling_to_static_pages',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (70,'2024_12_26_154709_alter_recruitments_static_pages_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (71,'2024_21_26_161928_message_as_encrypted',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (72,'2024_21_27_112704_add_titles_descriptions_story_static_pages_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (73,'2024_21_27_113004_alter_historical_milestones_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (74,'2024_08_27_160303_make_product_id_nullable_on_videos_table',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (75,'2024_08_27_164534_replace_submeat_id_in_products',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (76,'2024_08_09_155605_create_news_categories_table',66); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (77,'2024_08_10_153246_create_news_table',67); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (78,'2024_08_22_105618_add_news_and_social_to_static_pages',68); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (79,'2024_08_29_094103_alter_breeders_table',69); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (80,'2024_09_05_155517_add_breeder_map_text_to_general_settings_table',70); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (81,'2024_09_03_155707_create_news_breedings_table',71); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (82,'2024_09_03_171124_add_breeding_to_static_pages',71); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (83,'2024_09_04_095651_create_customer_favorites_table',71); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (84,'2024_21_27_114005_alter_customers_table',71); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (85,'2024_21_27_114006_create_news_clubs_table',71); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (86,'2024_21_27_114007_create_surveys_answers_table',71); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (87,'2024_21_27_123904_create_discounts_table',71); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (88,'2019_06_24_140207_create_saml2_tenants_table',72); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (89,'2020_10_22_140856_add_relay_state_url_column_to_saml2_tenants_table',73); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (90,'2020_10_23_072902_add_name_id_format_column_to_saml2_tenants_table',74); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (91,'2024_09_18_084846_alter_routes_general_settings_table',75); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (92,'2024_09_18_123033_alter_tips_recipes_table',76); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (93,'2024_09_18_124241_alter_advice_recipes_table',77); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (94,'2024_09_18_150649_remove_required_on_banner_in_products_table',78); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (95,'2024_09_19_084122_alter_users_for_saml',79); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (96,'2024_09_19_093926_alter_cookingtime_recipes_table',80); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (97,'2024_09_19_100415_alter_tips_length_recipes_table',81); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (98,'2024_09_19_111335_remove_required_on_picture_in_products_table',82); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (99,'2024_09_20_115443_alter_customers_for_migration',82); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (100,'2024_09_20_150909_alter_product_static_pages_table',82); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (101,'2024_09_20_154248_add_claim_title_to_product_table',82); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (102,'2024_09_23_092214_alter_tips_recipes_table',82); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (103,'2024_21_27_123909_add_order_to_survey_answers_table',82); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (104,'2024_09_19_114210_add_picto_placement_historical_milestone_table',83); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (105,'2024_09_19_125103_add_order_to_historical_milestones_table',83); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (106,'2024_09_19_142211_alter_source_key_numbers_table',83); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (107,'2024_10_04_100723_add_color_to_news_categories_table',84); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (108,'2024_21_27_123905_create_sell_items_table',85); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (109,'2024_21_27_123906_create_orders_table',85); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (110,'2024_21_27_123907_create_order_sell_item_table',85); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (111,'2024_21_27_123908_create_delivery_addresses_table',85); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (112,'2024_21_27_123910_add_type_sell_items_table',85); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (113,'2024_21_27_123911_alter_menu_node_general_settings_table',86); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (114,'2024_21_27_123912_add_elements_in_sellitems_table',87); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (115,'2018_08_08_100000_create_telescope_entries_table',88); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (116,'2024_21_27_123912_alter_tables_for_unit_tests',88); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (117,'2024_21_27_123913_add_OCB_breeders_table',89); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (118,'2024_11_13_120306_create_uwil_redirections_table',90); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (119,'2024_21_27_123913_add_search_type_static_pages_table',91); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (120,'2025_04_03_095319_add_static_page_game_rules',92); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (122,'2025_06_05_100921_add_fields_to_offers_table',93); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (123,'2025_06_18_095049_add_offer_location_address_details_table',94); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (124,'2025_06_18_110532_alter_uwil_redirections_table',95); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (125,'2025_06_18_171424_change_associated_page_field_in_news_breedings_table',95); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (126,'2025_06_19_144056_add_ratings_table',96); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (127,'2025_09_05_161808_alter_customerables_table',97); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (128,'2025_11_07_093313_create_optin_consents_table',98); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (129,'2026_02_20_133806_create_categories_approaches',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (130,'2026_02_20_134045_create_sections_approaches',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (131,'2026_03_03_092239_add_data_for_static_page_exit_outside',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (132,'2026_03_04_123521_add_data_to_static_page_oui_c_bon',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (133,'2026_03_10_105432_add_data_by_default_to_static_page_our_farms',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (134,'2026_03_13_124146_add_data_for_breeding_static_page',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (135,'2026_04_28_124147_create_game_golden-crush_table',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (136,'2026_04_30_115934_add_data_to_static_page_tdf',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (137,'2026_05_07_144145_add_section_for_oui_c_bon_page',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (138,'2026_06_03_124556_increase_static_pages_content_size',99); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (139,'2026_06_10_130304_update_data_to_static_page_tdf',99); +COMMIT; +SET AUTOCOMMIT=@OLD_AUTOCOMMIT; diff --git a/database/seeders/Development/NewsCorporateSeeder.php b/database/seeders/Development/NewsCorporateSeeder.php index ab361d52..d9331a50 100644 --- a/database/seeders/Development/NewsCorporateSeeder.php +++ b/database/seeders/Development/NewsCorporateSeeder.php @@ -26,7 +26,7 @@ class NewsCorporateSeeder extends Seeder $newsCorporate->picture = FileStorageHelper::storeFile( $newsCorporate, new \SplFileInfo(\resource_path( - '../database/factories/assets/newsCorporates/default-304x184.png' + '../database/factories/assets/news_corporate/default-304x184.png' )) ); $newsCorporate->saveQuietly(); diff --git a/database/seeders/Mandatory/StaticPageSeeder.php b/database/seeders/Mandatory/StaticPageSeeder.php index 74d39f64..3d0591ad 100644 --- a/database/seeders/Mandatory/StaticPageSeeder.php +++ b/database/seeders/Mandatory/StaticPageSeeder.php @@ -17,6 +17,10 @@ class StaticPageSeeder extends Seeder */ public function run(): void { + $this->seedStaticPage(StaticPageType::home); + $this->seedStaticPage(StaticPageType::exitOutside); + $this->seedStaticPage(StaticPageType::ouiCBon); + $this->seedStaticPage(StaticPageType::tdf); $this->seedStaticPage(StaticPageType::contact); $this->seedStaticPage(StaticPageType::legals); $this->seedStaticPage(StaticPageType::confidentiality); @@ -121,7 +125,7 @@ class StaticPageSeeder extends Seeder */ private function seedStaticPage(StaticPageType $type, array $data = []): void { - StaticPage::query()->updateOrCreate( + $staticPage = new StaticPage( ['type' => $type], [ 'type' => $type, @@ -141,5 +145,7 @@ class StaticPageSeeder extends Seeder 'data' => $data, ] ); + $staticPage->slug = str($type->label())->slug(); + $staticPage->saveQuietly(); } } diff --git a/resources/ts/club/components/club/shop/RecapComponent.vue b/resources/ts/club/components/club/shop/RecapComponent.vue index 14776a59..20452d32 100644 --- a/resources/ts/club/components/club/shop/RecapComponent.vue +++ b/resources/ts/club/components/club/shop/RecapComponent.vue @@ -202,9 +202,7 @@ :key="payementMethod.value" :class="{'list-group-item bg-white text-bg-white border-0 ps-0 ps-md-3 ms-md-4': true, 'ms-4': payementMethod.value != 1}" > -
+
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; -import { onMounted, defineEmits, ref } from "vue"; +import { defineEmits, onMounted, ref } from "vue"; import asset from "../../../../modules/asset"; import route from "../../../../modules/route"; import trans from "../../../../modules/trans";