Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Illuminate\Database\Migrations\Migration;
- class CreateCourses extends Migration {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('courses', function($table) {
- // auto incremental id
- $table->increments('id');
- // int
- $table->integer('price');
- $table->integer('duration');
- $table->integer('course_type_id');
- // varchar
- $table->string('title', 32);
- // text
- $table->text('description');
- // created_at | updated_at DATETIME
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('courses');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement