/**
  * Activates the table.
  *
  * @param \Illuminate\Database\Schema\Blueprint $table
  */
 public function activate(Blueprint $table)
 {
     $table->increments('id');
     $table->string('title');
     $table->string('slug');
     $table->enum('type', ['PROFILE', 'SHARE'])->default('PROFILE');
 }
 /**
  * Activates the table.
  *
  * @param \Illuminate\Database\Schema\Blueprint $table
  */
 public function activate(Blueprint $table)
 {
     $table->increments('id');
     $table->string('title');
     $table->string('slug');
     $table->string('url');
     $table->boolean('default_set');
 }
 public static function _schema_locationTrait(Blueprint $table)
 {
     $table->string('longitude')->nullable();
     $table->string('latitude')->nullable();
     $table->string('location_precision')->nullable();
     $table->string('location_title')->nullable();
     return $table;
 }
 /**
  * Activates the table.
  *
  * @param \Illuminate\Database\Schema\Blueprint $table
  */
 public function activate(Blueprint $table)
 {
     $table->increments('id');
     $table->string('title');
     $table->string('handle');
     $table->string('url');
     $table->integer('set_id');
 }
 /**
  * @param Blueprint $table
  * @return Blueprint
  */
 public static function _schema_ResetPasswordTokens(Blueprint $table)
 {
     $table->string('key')->index();
     $table->string('token');
     $table->integer('user_id')->index();
     $table->dateTime('expires_at');
     return $table;
 }
Example #6
0
 protected function create(Blueprint $table)
 {
     $table->create();
     $table->string('slug', 100)->primary();
     $table->string('name');
     $table->integer('position')->default(0);
     $table->boolean('conversations_enabled')->default(true);
     $table->timestamps();
 }
Example #7
0
 public static function _schema_roles(\Illuminate\Database\Schema\Blueprint $table)
 {
     $table->integer('parent_id');
     $table->string('name')->unique();
     $table->longText('permissions');
     $table->string('title');
     $table->text('desc')->nullable();
     return $table;
 }
 public static function _schema_imageModel(Blueprint $table)
 {
     $table->string('image');
     $table->string('url');
     $table->unsignedInteger('order')->default(0);
     $table->string('type')->default('default');
     $table->integer('width');
     $table->integer('height');
     $table->morphs('imageable');
     return $table;
 }
 public static function _schema_UserModel(Blueprint $table)
 {
     $table->string('email')->nullable()->label('邮箱');
     $table->string('mobile')->nullable()->label('手机号码');
     $table->string('username')->nullable()->label('姓名');
     $table->string('nickname')->nullable()->label('昵称');
     $table->enum('gender', ['未填' => '未填', '男' => '男', '女' => '女'])->default('未填')->label('性别');
     $table->string('avatar')->nullable()->label('头像');
     $table->date('birthday')->nullable()->label('生日');
     return $table;
 }
Example #10
0
 protected function create(Blueprint $table)
 {
     $table->create();
     $table->string('id', 40);
     $table->integer('user_id')->unsigned()->default(1);
     $table->integer('created')->unsigned()->default(0);
     $table->integer('last_activity')->unsigned()->default(0);
     $table->string('last_ip', 200)->default('0.0.0.0');
     $table->text('payload');
     $table->primary('id');
     $table->index('user_id');
 }
 /**
  * Give me the tools and I will tell you what my schema is...
  *
  * @param Blueprint $table The blueprint for the database table.
  * @return Blueprint The designed database table schema.
  */
 public static function describeSchema(Blueprint $table)
 {
     $table->increments('id');
     $table->string('uuid', 36);
     $table->integer('playhead')->unsigned();
     $table->text('metadata');
     $table->text('payload');
     $table->string('recorded_on', 32);
     $table->text('type');
     $table->unique(['uuid', 'playhead']);
     return $table;
 }
 /**
  * @param Blueprint $table
  * @return Blueprint
  */
 public static function _schema_LoginableTrait(Blueprint $table)
 {
     $table->string('password')->nullable();
     $table->rememberToken('remember_token');
     $table->dateTime('last_login')->nullable();
     $table->string('last_ip')->nullable();
     $table->integer('fails')->default(0);
     $table->enum('is_banned', [0, 1])->default(0);
     $table->text('ban_reason')->nullable();
     $table->enum('locked_screen', [0, 1])->default(0);
     return $table;
 }
Example #13
0
 /**
  * @param Blueprint $table
  * @return Blueprint
  */
 public static function _schema_chinaArea(Blueprint $table)
 {
     $table->integer('areano');
     $table->integer('parentno');
     $table->string('name');
     $table->string('province')->nullable();
     $table->string('city')->nuallable();
     $table->string('distinct')->nullable();
     $table->enum('flag', ['国家', '省', '市', '区/县']);
     $table->integer('sort')->default(99);
     $table->integer('zipcode')->default(0);
     return $table;
 }
Example #14
0
 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->string('title', 50)->default('');
     $table->integer('parent_group_id')->unsigned()->nullable();
 }
Example #15
0
 protected function create(Blueprint $table)
 {
     $table->create();
     $table->string('conf_name', 255)->default('');
     $table->text('conf_value')->nullable();
     $table->primary('conf_name');
 }
Example #16
0
 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->string('poster', 200)->default('');
     $table->integer('poster_id')->unsigned()->default(1);
     $table->string('poster_ip', 39)->nullable();
     $table->text('message')->nullable();
     $table->boolean('hide_smilies')->default(false);
     $table->integer('posted')->unsigned()->default(0);
     $table->integer('edited')->unsigned()->nullable();
     $table->string('edited_by', 200)->nullable();
     $table->integer('conversation_id')->unsigned();
     $table->index('conversation_id');
     $table->index(['poster_id', 'conversation_id']);
 }
Example #17
0
 public static function _schema_tagModel(\Illuminate\Database\Schema\Blueprint $table)
 {
     $table->text('name')->nullable();
     $table->string('type')->default('default');
     $table->morphs('taggable');
     return $table;
 }
Example #18
0
 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->string('category_slug', 100)->nullable()->index();
     $table->string('title');
     $table->string('poster', 200)->default('');
     $table->integer('posted')->unsigned()->default(0);
     $table->integer('first_post_id')->unsigned()->default(0);
     $table->integer('last_post')->unsigned()->default(0);
     $table->integer('last_post_id')->unsigned()->default(0);
     $table->string('last_poster', 200)->nullable();
     $table->integer('num_views')->unsigned()->default(0);
     $table->integer('num_replies')->unsigned()->default(0);
     $table->timestamps();
 }
 /**
  * Create the table schema.
  *
  * @param Blueprint $table
  *
  * @return mixed
  */
 protected function create(Blueprint $table)
 {
     $table->increments('id');
     $table->string('task');
     $table->text('data')->nullable();
     $table->string('state')->default(JobState::IDLE);
     $table->text('message')->nullable();
     $table->boolean('schedulable')->default(false);
     $table->integer('attempts')->default(0);
     $table->integer('retries')->default(0);
     $table->timestamp('started_at')->nullable();
     $table->timestamp('completed_at')->nullable();
     $table->timestamp('expires_at')->nullable();
     $table->timestamp('run_at')->nullable();
     $table->timestamps();
 }
 /**
  * Add confirmation columns.
  *
  * @param  \Illuminate\Database\Schema\Blueprint  $table
  */
 private function addConfirmationColumns(Blueprint $table)
 {
     if (UserConfirmator::isEnabled()) {
         $table->boolean('is_confirmed')->default(0);
         $table->string('confirmation_code', UserConfirmator::getLength())->nullable();
         $table->timestamp('confirmed_at')->nullable();
     }
 }
Example #21
0
 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->integer('group_id')->unsigned();
     $table->string('name', 50);
     $table->boolean('value');
 }
 /**
  * Create the table schema.
  *
  * @param Blueprint $table
  *
  * @return mixed
  */
 protected function create(Blueprint $table)
 {
     $table->increments('id');
     $table->unsignedInteger('job_id');
     $table->string('name');
     $table->unique(['job_id', 'name']);
     $table->timestamps();
 }
 /**
  * Create the table schema.
  *
  * @param Blueprint $table
  *
  * @return mixed
  */
 protected function create(Blueprint $table)
 {
     $table->increments('id');
     $table->text('public_id');
     $table->text('secret_key');
     $table->string('type');
     $table->text('data');
     $table->timestamps();
 }
 private function ifNoUsersTable(Blueprint $table)
 {
     $table->increments('id');
     $table->string('first_name');
     $table->string('last_name');
     $table->string('email')->unique();
     $table->string('avatar');
     $table->string('provider');
     $table->string('provider_id')->unique();
     $table->longText('provider_token');
     $table->string('password', 60)->nullable();
     $table->boolean('verified')->default(false);
     $table->string('gender')->nullable();
     $table->string('link');
     $table->rememberToken();
     $table->timestamps();
 }
 /**
  * Add the field type column.
  *
  * @param Blueprint           $table
  * @param AssignmentInterface $assignment
  */
 public function addColumn(Blueprint $table, AssignmentInterface $assignment)
 {
     // Skip if the column already exists.
     if ($this->schema->hasColumn($table->getTable(), $this->fieldType->getColumnName() . '_id')) {
         return;
     }
     $table->string($this->fieldType->getColumnName() . '_type')->nullable(!$assignment->isRequired());
     $table->integer($this->fieldType->getColumnName() . '_id')->nullable(!$assignment->isRequired());
     if ($assignment->isUnique() && $assignment->isTranslatable()) {
         $table->unique([$this->fieldType->getColumnName() . '_type', $this->fieldType->getColumnName() . '_id']);
     }
 }
 /**
  * @param Blueprint $table table
  * @return Blueprint
  */
 private function setColumns(Blueprint $table)
 {
     $table->string('parentId', 255)->default('');
     $table->string('instanceId', 255)->default('');
     $table->string('type', 255)->default('');
     // users
     $table->string('userType', '16')->default('normal');
     $table->string('userId', 255);
     $table->string('writer', 255);
     $table->string('email')->nullable();
     // 비회원 작성일때 email 받기?
     $table->string('certifyKey', 255);
     // nonmember document's password
     // count
     $table->integer('readCount')->default(0);
     $table->integer('commentCount')->default(0);
     $table->integer('assentCount')->default(0);
     $table->integer('dissentCount')->default(0);
     // display contents config values
     $table->integer('approved')->default(Document::APPROVED_APPROVED);
     $table->integer('published')->default(Document::PUBLISHED_PUBLISHED);
     $table->integer('status')->default(Document::STATUS_PUBLIC);
     $table->integer('display')->default(Document::DISPLAY_VISIBLE);
     $table->integer('format')->default(Document::FORMAT_HTML);
     // search
     $table->string('locale', 255)->default('');
     $table->string('title', 255);
     $table->text('content');
     $table->text('pureContent');
     $table->timestamp('createdAt');
     $table->timestamp('updatedAt');
     $table->timestamp('publishedAt')->nullable();
     $table->timestamp('deletedAt')->nullable();
     $table->string('head', 50);
     $table->string('reply', 200);
     $table->string('ipaddress', 16);
     $table->index('createdAt');
     $table->unique(['head', 'reply']);
     return $table;
 }
Example #27
0
 public static function _schema_usermodel(\Illuminate\Database\Schema\Blueprint $table)
 {
     $table->string('username', 100);
     $table->string('nickname', 30)->unique();
     $table->string('email', 100);
     $table->string('mobile', 20);
     $table->integer('exp')->default(0);
     $table->integer('points')->default(0);
     $table->date('birthdate')->nullable();
     $table->enum('gender', ['男', '女', '保密'])->default('保密');
     $table->string('password', 100);
     $table->string('remember_token', 100);
     $table->timestamp('last_login');
     return $table;
 }
Example #28
0
 /**
  * Campo LISTA.
  */
 public function options($column)
 {
     $col = parent::string($column, 5);
     $col->nullable(true);
     return $col;
 }
 public function testAddingString()
 {
     $blueprint = new Blueprint('users');
     $blueprint->string('foo');
     $statements = $blueprint->toSql($this->getGrammar());
     $this->assertEquals(1, count($statements));
     $this->assertEquals('alter table "users" add "foo" nvarchar(255) not null', $statements[0]);
     $blueprint = new Blueprint('users');
     $blueprint->string('foo', 100);
     $statements = $blueprint->toSql($this->getGrammar());
     $this->assertEquals(1, count($statements));
     $this->assertEquals('alter table "users" add "foo" nvarchar(100) not null', $statements[0]);
     $blueprint = new Blueprint('users');
     $blueprint->string('foo', 100)->nullable()->default('bar');
     $statements = $blueprint->toSql($this->getGrammar());
     $this->assertEquals(1, count($statements));
     $this->assertEquals('alter table "users" add "foo" nvarchar(100) null default \'bar\'', $statements[0]);
 }
Example #30
0
 /**
  * @param Blueprint $table
  *
  * @return \Illuminate\Support\Fluent
  */
 public function setDatabaseFieldType(Blueprint $table)
 {
     return $table->string($this->getDBKey(), 255);
 }