Renamed jetstream team to organization

This commit is contained in:
Constantin Graf
2024-01-21 19:52:19 +01:00
parent 6377df1f44
commit 0a8d958ccc
63 changed files with 461 additions and 329 deletions

View File

@@ -13,7 +13,7 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('teams', function (Blueprint $table) {
Schema::create('organizations', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('user_id')->index();
$table->string('name');

View File

@@ -13,14 +13,14 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('team_user', function (Blueprint $table) {
Schema::create('organization_user', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('team_id');
$table->foreignUuid('organization_id');
$table->foreignUuid('user_id');
$table->string('role')->nullable();
$table->timestamps();
$table->unique(['team_id', 'user_id']);
$table->unique(['organization_id', 'user_id']);
});
}

View File

@@ -13,16 +13,16 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('team_invitations', function (Blueprint $table) {
Schema::create('organization_invitations', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('team_id')
$table->foreignUuid('organization_id')
->constrained()
->cascadeOnDelete();
$table->string('email');
$table->string('role')->nullable();
$table->timestamps();
$table->unique(['team_id', 'email']);
$table->unique(['organization_id', 'email']);
});
}

View File

@@ -19,7 +19,7 @@ return new class extends Migration
$table->uuid('organization_id');
$table->foreign('organization_id')
->references('id')
->on('teams')
->on('organizations')
->cascadeOnUpdate()
->restrictOnDelete();
$table->timestamps();

View File

@@ -26,7 +26,7 @@ return new class extends Migration
$table->uuid('organization_id');
$table->foreign('organization_id')
->references('id')
->on('teams')
->on('organizations')
->cascadeOnUpdate()
->restrictOnDelete();
$table->timestamps();

View File

@@ -25,7 +25,7 @@ return new class extends Migration
$table->uuid('organization_id');
$table->foreign('organization_id')
->references('id')
->on('teams')
->on('organizations')
->cascadeOnUpdate()
->restrictOnDelete();
$table->timestamps();

View File

@@ -19,7 +19,7 @@ return new class extends Migration
$table->uuid('organization_id');
$table->foreign('organization_id')
->references('id')
->on('teams')
->on('organizations')
->cascadeOnUpdate()
->restrictOnDelete();
$table->timestamps();

View File

@@ -28,7 +28,7 @@ return new class extends Migration
$table->uuid('organization_id');
$table->foreign('organization_id')
->references('id')
->on('teams')
->on('organizations')
->cascadeOnUpdate()
->restrictOnDelete();
$table->uuid('project_id')->nullable();