![]() ![]() The schema builder contains a variety of column types that you may specify when building your tables: CommandĪlias of $table->unsignedBigInteger('user_id').Īuto-incrementing UNSIGNED BIGINT (primary key) equivalent column.ĭATETIME equivalent column with precision (total digits).ĭATETIME (with timezone) equivalent column with precision (total digits).ĭECIMAL equivalent column with precision (total digits) and scale (decimal digits).ĭOUBLE equivalent column with precision (total digits) and scale (decimal digits).įLOAT equivalent column with a precision (total digits) and scale (decimal digits).Īuto-incrementing UNSIGNED INTEGER (primary key) equivalent column.Īuto-incrementing UNSIGNED MEDIUMINT (primary key) equivalent column.Īdds taggable_id UNSIGNED BIGINT and taggable_type VARCHAR equivalent columns.Īdds taggable_id CHAR(36) and taggable_type VARCHAR(255) UUID equivalent columns.Īdds nullable versions of morphs() columns.Īdds nullable versions of uuidMorphs() columns.Īdds a nullable remember_token VARCHAR(100) equivalent column. ![]() To create a migration, use the make:migration Artisan command: The Laravel Schema facade provides database agnostic support for creating and manipulating tables across all of Laravel's supported database systems. If you have ever had to tell a teammate to manually add a column to their local database schema, you've faced the problem that database migrations solve. Migrations are typically paired with Laravel's schema builder to build your application's database schema. Migrations are like version control for your database, allowing your team to modify and share the application's database schema. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |