<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 可用的字段類型 * 數據庫結構生成器包含構建表時可以指定的各種字段類型: | 命令 | 說明 | | --- | --- | | $table->id(); | $table->bigIncrements('id') 的別名 | | $table->foreignId('user\_id'); | $table->unsignedBigInteger('user\_id') 的別名 | | $table->bigIncrements('id'); | 遞增 ID(主鍵),相當于「UNSIGNED BIG INTEGER」 | | $table->bigInteger('votes'); | 相當于 BIGINT | | $table->binary('data'); | 相當于 BLOB | | $table->boolean('confirmed'); | 相當于 BOOLEAN | | $table->char('name', 100); | 相當于帶有長度的 CHAR | | $table->date('created\_at'); | 相當于 DATE | | $table->dateTime('created\_at', 0); | 相當于 DATETIME ,可以指定位數 | | $table->dateTimeTz('created\_at', 0); | 相當于 DATETIME (帶時區) ,可以指定位數 | | $table->decimal('amount', 8, 2); | 相當于 DECIMAL,可以指定總位數和小數位數 | | $table->double('amount', 8, 2); | 相當于 DOUBLE,可以指定總位數和小數位數 | | $table->enum('level', \['easy', 'hard'\]); | 相當于 ENUM | | $table->float('amount', 8, 2); | 相當于 FLOAT,可以指定總位數和小數位數 | | $table->geometry('positions'); | 相當于 GEOMETRY | | $table->geometryCollection('positions'); | 相當于 GEOMETRYCOLLECTION | | $table->increments('id'); | 遞增 ID(主鍵),相當于 UNSIGNED INTEGER | | $table->integer('votes'); | 相當于 INTEGER | | $table->ipAddress('visitor'); | 相當于 IP 地址 | | $table->json('options'); | 相當于 JSON | | $table->jsonb('options'); | 相當于 JSONB | | $table->lineString('positions'); | 相當于 LINESTRING | | $table->longText('description'); | 相當于 LONGTEXT | | $table->macAddress('device'); | 相當于 MAC 地址 | | $table->mediumIncrements('id'); | 遞增 ID(主鍵),相當于 UNSIGNED MEDIUMINT | | $table->mediumInteger('votes'); | 相當于 MEDIUMINT | | $table->mediumText('description'); | 相當于 MEDIUMTEXT | | $table->morphs('taggable'); | 相當于加入遞增 UNSIGNED BIGINT 類型的 taggable\_id 與字符串類型的 taggable\_type | | $table->uuidMorphs('taggable'); | 相當于添加一個 CHAR (36) 類型的 taggable\_id 字段和 VARCHAR (255) UUID 類型的 taggable\_type | | $table->multiLineString('positions'); | 相當于 MULTILINESTRING | | $table->multiPoint('positions'); | 相當于 MULTIPOINT | | $table->multiPolygon('positions'); | 相當于 MULTIPOLYGON | | $table->nullableMorphs('taggable'); | 添加一個可以為空版本的 morphs() 字段. | | $table->nullableUuidMorphs('taggable'); | 添加一個可以為空版本的 uuidMorphs() 字段 | | $table->nullableTimestamps(0); | timestamps() 方法的別名 | | $table->point('position'); | 相當于 POINT | | $table->polygon('positions'); | 相當于 POLYGON | | $table->rememberToken(); | 添加一個允許空值的 VARCHAR (100) 類型的 remember\_token 字段 | | $table->set('flavors', \['strawberry', 'vanilla'\]); | 相當于 SET | | $table->smallIncrements('id'); | 遞增 ID(主鍵),相當于 UNSIGNED SMALLINT | | $table->smallInteger('votes'); | 相當于 SMALLINT | | $table->softDeletes('deleted\_at', 0); | 相當于為軟刪除添加一個可空的 deleted\_at 字段 | | $table->softDeletesTz('deleted\_at', 0); | 相當于為軟刪除添加一個可空的 帶時區的 deleted\_at 字段 | | $table->string('name', 100); | 相當于指定長度的 VARCHAR | | $table->text('description'); | 相當于 TEXT | | $table->time('sunrise', 0); | 相當于指定位數的 TIME | | $table->timeTz('sunrise', 0); | 相當于指定位數帶時區的 TIME | | $table->timestamp('added\_on', 0); | 相當于指定位數的 TIMESTAMP | | $table->timestampTz('added\_on', 0); | 相當于指定位數帶時區的 TIMESTAMP | | $table->timestamps(0); | 相當于添加可空的 TIMESTAMP 類型的 created\_at 和 updated\_at | | $table->timestampsTz(0); | 相當于添加指定時區的可空的 TIMESTAMP 類型的 created\_at 和 updated\_at | | $table->tinyIncrements('id'); | 相當于自動遞增 UNSIGNED TINYINT | | $table->tinyInteger('votes'); | 相當于 TINYINT | | $table->unsignedBigInteger('votes'); | 相當于 UNSIGNED BIGINT | | $table->unsignedDecimal('amount', 8, 2); | 相當于 UNSIGNED DECIMAL ,可以指定總位數和小數位數 | | $table->unsignedInteger('votes'); | 相當于 UNSIGNED INTEGER | | $table->unsignedMediumInteger('votes'); | 相當于 UNSIGNED MEDIUMINT | | $table->unsignedSmallInteger('votes'); | 相當于 UNSIGNED SMALLINT | | $table->unsignedTinyInteger('votes'); | 相當于 UNSIGNED TINYINT | | $table->uuid('id'); | 相當于 UUID | | $table->year('birth\_year'); | 相當于 YEAR | ## 字段修飾 除了上述列出的字段類型之外,還有幾個可以在添加字段到數據庫表時使用的「修飾符」。例如,如果要把字段設置為「可空」,你可以使用 nullable 方法: ``` Schema::table('users', function (Blueprint $table) { $table->string('email')->nullable(); }); ``` * 以下是所有可用的字段修飾符的列表。此列表不包括 索引修飾符: | Modifier | 描述 | | --- | --- | | \->after('column') | 將此字段放置在其它字段 「之后」 (MySQL) | | \->autoIncrement() | 將 INTEGER 類型的字段設置為自動遞增的主鍵 | | \->charset('utf8mb4') | 指定一個字符集 (MySQL) | | \->collation('utf8mb4\_unicode\_ci') | 指定排序規則 (MySQL/PostgreSQL/SQL Server) | | \->comment('my comment') | 為字段增加注釋 (MySQL/PostgreSQL) | | \->default($value) | 為字段指定 “默認” 值 | | \->first() | 將此字段放置在數據表的 「首位」 (MySQL) | | \->from($integer) | 給自增字段設置一個起始值 (MySQL / PostgreSQL) | | \->nullable($value = true) | 此字段允許寫入 NULL 值(默認情況下) | | \->storedAs($expression) | 創建一個存儲生成的字段 (MySQL) | | \->unsigned() | 設置 INTEGER 類型的字段為 UNSIGNED (MySQL) | | \->useCurrent() | 將 TIMESTAMP 類型的字段設置為使用 CURRENT\_TIMESTAMP 作為默認值 | | \->virtualAs($expression) | 創建一個虛擬生成的字段 (MySQL) | | \->generatedAs($expression) | 使用指定的序列生成標識列(PostgreSQL) | | \->always() | 定義序列值優先于標識列的輸入 (PostgreSQL) |
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看