# Fileupload

# altes Uploads-Model

=> Beinhaltet die Uploads der Nutzer.

  • Functionality
  • Implementierung: ✅
  • Erweiterung:
    • Vereinfachung

# Data


CREATE TABLE `pyou_uploads` (
    `upload_uuid` varchar(36) NOT NULL,
    `user_uuid` varchar(36) DEFAULT NULL,
    `upload_file` varchar(255) DEFAULT NULL,
    `upload_name` varchar(255) DEFAULT NULL,
    `upload_ext` varchar(5) DEFAULT NULL,
    `upload_type` varchar(255) DEFAULT NULL,
    `upload_size` int(11) DEFAULT NULL,
    `upload_folder` varchar(255) DEFAULT NULL,
    `upload_ts_create` timestamp NULL DEFAULT NULL,
    `upload_ts_delete` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`upload_uuid`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8;

Anmerkung:

Beziehungen

  • n-1 zu User (belongsTo)
public function up()
{
    Schema::create('fileuploads', function (Blueprint $table) {
    $table->uuid('id')->primary();
    $table->foreignUuid('user_id')->index()->constrained()->onDelete('cascade');
    $table->string('original_name');
    $table->string('path');
    $table->string('thumbnail_path')->nullable();
    $table->integer('size');
    $table->string('extension');
    $table->string('mime');
    $table->enum('type', ['cv', 'header_image', 'content_image', 'logo']);
    $table->timestamps();
    $table->softDeletes();
    });
}

# übergeordnetes Thema

2.6 Datenstruktur

Last Updated: 8/2/2021, 3:02:44 AM