Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@ public function up()
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');

/**
* PostgreSQL doesn't support "text" column type so we need to use the 'json' type instead.
*
* Docs: https://filamentphp.com/docs/2.x/notifications/database-notifications
*/
if (env('DB_CONNECTION') == 'pgsql') {
$table->json('data');
} else {
$table->text('data');
}

$table->timestamp('read_at')->nullable();
$table->timestamps();
});
Expand Down
45 changes: 45 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,47 @@ services:
networks:
- sail
depends_on:
# - mysql
# - pgsql
- mailhog
# mysql:
# image: 'mysql/mysql-server:8.0'
# ports:
# - '${FORWARD_DB_PORT:-3306}:3306'
# environment:
# MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
# MYSQL_ROOT_HOST: "%"
# MYSQL_DATABASE: '${DB_DATABASE}'
# MYSQL_USER: '${DB_USERNAME}'
# MYSQL_PASSWORD: '${DB_PASSWORD}'
# MYSQL_ALLOW_EMPTY_PASSWORD: 1
# volumes:
# - 'sail-mysql:/var/lib/mysql'
# - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
# networks:
# - sail
# healthcheck:
# test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
# retries: 3
# timeout: 5s
# pgsql:
# image: 'postgres:14'
# ports:
# - '${FORWARD_DB_PORT:-5432}:5432'
# environment:
# PGPASSWORD: '${DB_PASSWORD:-secret}'
# POSTGRES_DB: '${DB_DATABASE}'
# POSTGRES_USER: '${DB_USERNAME}'
# POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
# volumes:
# - 'sail-pgsql:/var/lib/postgresql/data'
# - './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
# networks:
# - sail
# healthcheck:
# test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
# retries: 3
# timeout: 5s
mailhog:
image: 'mailhog/mailhog:latest'
ports:
Expand All @@ -34,3 +74,8 @@ services:
networks:
sail:
driver: bridge
# volumes:
# sail-mysql:
# driver: local
# sail-pgsql:
# driver: local