@@ -277,52 +277,8 @@ class DemoSeeder extends Seeder
277277}
278278EOM
279279
280- # Add migration to add SCIM fields to users table
281- RUN cat > /example/database/migrations/2021_01_01_000003_add_scim_fields_to_users_table.php <<'EOM'
282- <?php
283-
284- use Illuminate\D atabase\M igrations\M igration;
285- use Illuminate\D atabase\S chema\B lueprint;
286- use Illuminate\S upport\F acades\S chema;
287-
288- return new class extends Migration {
289- public function up(): void
290- {
291- Schema::table('users' , function (Blueprint $table) {
292- if (!Schema::hasColumn('users' , 'formatted' )) {
293- $table->string('formatted' )->nullable();
294- }
295- if (!Schema::hasColumn('users' , 'displayName' )) {
296- $table->string('displayName' )->nullable();
297- }
298- if (!Schema::hasColumn('users' , 'active' )) {
299- $table->boolean('active' )->default(false);
300- }
301- if (!Schema::hasColumn('users' , 'roles' )) {
302- $table->json('roles' )->nullable();
303- }
304- });
305- }
306-
307- public function down(): void
308- {
309- Schema::table('users' , function (Blueprint $table) {
310- if (Schema::hasColumn('users' , 'formatted' )) {
311- $table->dropColumn('formatted' );
312- }
313- if (Schema::hasColumn('users' , 'displayName' )) {
314- $table->dropColumn('displayName' );
315- }
316- if (Schema::hasColumn('users' , 'active' )) {
317- $table->dropColumn('active' );
318- }
319- if (Schema::hasColumn('users' , 'roles' )) {
320- $table->dropColumn('roles' );
321- }
322- });
323- }
324- };
325- EOM
280+ # Publish SCIM migrations from the package
281+ RUN php artisan vendor:publish --tag=laravel-scim-migrations
326282
327283# Run migrations and seed demo data
328284RUN php artisan migrate && php artisan db:seed --class=Database\\ Seeders\\ DemoSeeder
0 commit comments