feat[docker]: create session table migration if session driver is set to database (#9587)

This commit is contained in:
Sabir Manandhar 2021-05-21 03:16:22 +05:45 committed by GitHub
parent 9eea46adef
commit c3d75d3be3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -45,6 +45,11 @@ then
cp -a /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/
fi
if [ "${SESSION_DRIVER}" == "database" ]
then
cp -a /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub /var/www/html/database/migrations/2021_05_06_0000_create_sessions_table.php
fi
php artisan migrate --force
php artisan config:clear
php artisan config:cache

View file

@ -54,6 +54,11 @@ then
cp -ax /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/
fi
if [ $SESSION_DRIVER = "database" ]
then
cp -ax /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub /var/www/html/database/migrations/2021_05_06_0000_create_sessions_table.php
fi
php artisan migrate --force
php artisan config:clear
php artisan config:cache