Migrate backend stack to PostgreSQL
فشلت بعض الفحوصات
Deploy Backend / deploy (push) Has been cancelled

هذا الالتزام موجود في:
Abdul Kareem
2026-02-16 21:03:30 +03:00
الأصل 2d1886462a
التزام 749b083a1f
11 ملفات معدلة مع 34 إضافات و32 حذوفات

عرض الملف

@@ -20,12 +20,12 @@ LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug LOG_LEVEL=debug
DB_CONNECTION=sqlite DB_CONNECTION=pgsql
# DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
# DB_PORT=3306 DB_PORT=5432
# DB_DATABASE=laravel DB_DATABASE=tabeley_db
# DB_USERNAME=root DB_USERNAME=postgres
# DB_PASSWORD= DB_PASSWORD=secret
SESSION_DRIVER=database SESSION_DRIVER=database
SESSION_LIFETIME=120 SESSION_LIFETIME=120

عرض الملف

@@ -23,6 +23,7 @@ RUN apk add --no-cache \
freetype-dev \ freetype-dev \
libzip-dev \ libzip-dev \
oniguruma-dev \ oniguruma-dev \
postgresql-dev \
tzdata \ tzdata \
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install -j"$(nproc)" \ && docker-php-ext-install -j"$(nproc)" \
@@ -30,7 +31,7 @@ RUN apk add --no-cache \
exif \ exif \
gd \ gd \
intl \ intl \
pdo_mysql \ pdo_pgsql \
zip \ zip \
&& apk del --no-cache \ && apk del --no-cache \
icu-dev \ icu-dev \
@@ -39,7 +40,8 @@ RUN apk add --no-cache \
libwebp-dev \ libwebp-dev \
freetype-dev \ freetype-dev \
libzip-dev \ libzip-dev \
oniguruma-dev oniguruma-dev \
postgresql-dev
COPY --from=vendor /app/vendor ./vendor COPY --from=vendor /app/vendor ./vendor
COPY . . COPY . .

عرض الملف

@@ -13,9 +13,9 @@ return new class extends Migration
$table->dropColumn('name'); $table->dropColumn('name');
// نضيف الحقول تبع مشروعنا // نضيف الحقول تبع مشروعنا
$table->string('first_name')->after('id'); $table->string('first_name');
$table->string('last_name')->after('first_name'); $table->string('last_name');
$table->string('phone')->unique()->after('email'); $table->string('phone')->unique();
}); });
} }

عرض الملف

@@ -9,7 +9,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('venues', function (Blueprint $table) { Schema::table('venues', function (Blueprint $table) {
$table->string('type')->default('restaurant')->after('name'); $table->string('type')->default('restaurant');
}); });
} }

عرض الملف

@@ -9,9 +9,9 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('venues', function (Blueprint $table) { Schema::table('venues', function (Blueprint $table) {
$table->string('address_text')->nullable()->after('description'); $table->string('address_text')->nullable();
$table->decimal('lat', 10, 7)->nullable()->after('address_text'); $table->decimal('lat', 10, 7)->nullable();
$table->decimal('lng', 10, 7)->nullable()->after('lat'); $table->decimal('lng', 10, 7)->nullable();
}); });
} }

عرض الملف

@@ -9,7 +9,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('venues', function (Blueprint $table) { Schema::table('venues', function (Blueprint $table) {
$table->boolean('is_active')->default(true)->after('lng'); $table->boolean('is_active')->default(true);
}); });
} }

عرض الملف

@@ -9,7 +9,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('reservations', function (Blueprint $table) { Schema::table('reservations', function (Blueprint $table) {
$table->string('code', 8)->unique()->after('id'); $table->string('code', 8)->unique();
}); });
} }

عرض الملف

@@ -9,9 +9,9 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('users', function (Blueprint $table) { Schema::table('users', function (Blueprint $table) {
$table->unsignedSmallInteger('strike_count')->default(0)->after('password'); $table->unsignedSmallInteger('strike_count')->default(0);
$table->timestamp('blocked_until')->nullable()->after('strike_count'); $table->timestamp('blocked_until')->nullable();
$table->boolean('blocked_permanent')->default(false)->after('blocked_until'); $table->boolean('blocked_permanent')->default(false);
}); });
} }

عرض الملف

@@ -9,7 +9,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('venues', function (Blueprint $table) { Schema::table('venues', function (Blueprint $table) {
$table->json('amenities')->nullable()->after('phone'); $table->json('amenities')->nullable();
}); });
} }

عرض الملف

@@ -9,8 +9,8 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::table('venues', function (Blueprint $table) { Schema::table('venues', function (Blueprint $table) {
$table->json('image_urls')->nullable()->after('amenities'); $table->json('image_urls')->nullable();
$table->json('offers')->nullable()->after('image_urls'); $table->json('offers')->nullable();
}); });
} }

عرض الملف

@@ -11,11 +11,11 @@ services:
APP_ENV: production APP_ENV: production
APP_DEBUG: "false" APP_DEBUG: "false"
APP_URL: ${APP_URL:-http://127.0.0.1:8000} APP_URL: ${APP_URL:-http://127.0.0.1:8000}
DB_CONNECTION: mysql DB_CONNECTION: pgsql
DB_HOST: db DB_HOST: db
DB_PORT: 3306 DB_PORT: 5432
DB_DATABASE: ${DB_DATABASE:-tabeley_db} DB_DATABASE: ${DB_DATABASE:-tabeley_db}
DB_USERNAME: ${DB_USERNAME:-root} DB_USERNAME: ${DB_USERNAME:-postgres}
DB_PASSWORD: ${DB_PASSWORD:-secret} DB_PASSWORD: ${DB_PASSWORD:-secret}
RUN_MIGRATIONS: "true" RUN_MIGRATIONS: "true"
depends_on: depends_on:
@@ -36,17 +36,17 @@ services:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
db: db:
image: mysql:8.4 image: postgres:17-alpine
container_name: tabeley_db container_name: tabeley_db
restart: unless-stopped restart: unless-stopped
environment: environment:
MYSQL_DATABASE: ${DB_DATABASE:-tabeley_db} POSTGRES_DB: ${DB_DATABASE:-tabeley_db}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-secret} POSTGRES_USER: ${DB_USERNAME:-postgres}
command: --default-authentication-plugin=mysql_native_password POSTGRES_PASSWORD: ${DB_PASSWORD:-secret}
ports: ports:
- "3307:3306" - "5433:5432"
volumes: volumes:
- db_data:/var/lib/mysql - db_data:/var/lib/postgresql/data
volumes: volumes:
db_data: db_data: