mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 03:32:15 +01:00
Renamed jetstream team to organization
This commit is contained in:
@@ -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');
|
||||
@@ -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']);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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']);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user