Skip to content

Commit a6da5ec

Browse files
Add roles field to SCIM user migration
Co-authored-by: arietimmerman <[email protected]>
1 parent 0d9e2fd commit a6da5ec

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Optionally publish the config for fine-grained control:
4545
php artisan vendor:publish --tag=laravel-scim
4646
```
4747

48-
If you need to add the `formatted` and `active` columns to your users table, publish the migrations:
48+
If you need to add SCIM-specific columns (`formatted`, `active`, `roles`) to your users table, publish the migrations:
4949

5050
```bash
5151
php artisan vendor:publish --tag=laravel-scim-migrations

database/migrations/2021_01_01_000003_add_scim_fields_to_users_table.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public function up(): void
1515
if (!Schema::hasColumn('users', 'active')) {
1616
$table->boolean('active')->default(false);
1717
}
18+
if (!Schema::hasColumn('users', 'roles')) {
19+
$table->json('roles')->nullable();
20+
}
1821
});
1922
}
2023
}
@@ -29,6 +32,9 @@ public function down(): void
2932
if (Schema::hasColumn('users', 'active')) {
3033
$table->dropColumn('active');
3134
}
35+
if (Schema::hasColumn('users', 'roles')) {
36+
$table->dropColumn('roles');
37+
}
3238
});
3339
}
3440
}

0 commit comments

Comments
 (0)