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_LEVEL=debug
DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=tabeley_db
DB_USERNAME=postgres
DB_PASSWORD=secret
SESSION_DRIVER=database
SESSION_LIFETIME=120

عرض الملف

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

عرض الملف

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

عرض الملف

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

عرض الملف

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

عرض الملف

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

عرض الملف

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