public static function _schema_profilemodel(\Illuminate\Database\Schema\Blueprint $table) { $table->unsignedInteger('user_id'); $table->text('avatar'); $table->index(['user_id']); return $table; }
/** * 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(); }
/** * 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; }
public static function _schema_tagModel(\Illuminate\Database\Schema\Blueprint $table) { $table->text('name')->nullable(); $table->string('type')->default('default'); $table->morphs('taggable'); return $table; }
/** * 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(); }
protected function create(Blueprint $table) { $table->create(); $table->string('conf_name', 255)->default(''); $table->text('conf_value')->nullable(); $table->primary('conf_name'); }
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; }
/** * @param Blueprint $table table * @return Blueprint */ private function documentSchema(Blueprint $table) { $table->string('parentId', 255)->default(''); $table->string('instanceId', 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->enum('approved', array('approved', 'waiting', 'rejected'))->default('approved'); $table->enum('published', array('published', 'waiting', 'reserved', 'rejected'))->default('published'); // temp 대신 draft가 어떨까? $table->enum('status', array('public', 'temp', 'trash', 'private', 'notice'))->default('public'); $table->enum('display', array('visible', 'secret', 'hidden'))->default('visible'); // search $table->string('locale', 255)->default(''); // multi-language support. ko, en, jp, ... $table->string('title', 255); $table->text('content'); $table->text('pureContent'); $table->timestamp('createdAt'); $table->timestamp('publishedAt'); $table->timestamp('updatedAt'); $table->timestamp('deletedAt')->nullable(); // 대댓글 처리를 위한 트리용 컬럼 추가 ex.) head, parent, depth $table->string('head', 50); // timestamp + uuid (ex. 1430369257-bd1fc797-474f-47a6-bedb-867a376490f2) $table->string('reply', 200)->nullable(); $table->string('listOrder', 250); $table->string('ipaddress', 16); $table->index('createdAt'); $table->unique(['head', 'reply']); return $table; }
public static function _schema_activityTrait(\Illuminate\Database\Schema\Blueprint $table) { $table->dateTime('activity_start')->nullable(); $table->dateTime('activity_end')->nullable(); $table->dateTime('signup_start')->nullable(); $table->dateTime('signup_end')->nullable(); $table->text('activity_title')->nullable(); $table->longText('activity_content')->nullable(); $table->morphs('owner'); 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; }
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'); }
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']); }
protected function create(Blueprint $table) { $table->create(); $table->increments('id'); $table->integer('group_id')->unsigned()->default(3); $table->string('username', 200)->default(''); $table->string('password', 60)->default(''); $table->string('email', 80)->default(''); $table->string('title', 50)->nullable(); $table->string('realname', 40)->nullable(); $table->string('url', 100)->nullable(); $table->string('location', 30)->nullable(); $table->text('signature')->nullable(); $table->integer('disp_topics')->unsigned()->nullable(); $table->integer('disp_posts')->unsigned()->nullable(); $table->integer('email_setting')->unsigned()->default(1); $table->boolean('notify_with_post')->default(false); $table->boolean('auto_notify')->default(false); $table->boolean('show_smilies')->default(true); $table->boolean('show_img')->default(true); $table->boolean('show_img_sig')->default(true); $table->boolean('show_avatars')->default(true); $table->boolean('show_sig')->default(true); $table->float('timezone')->default(0); $table->boolean('dst')->default(false); $table->integer('time_format')->unsigned()->default(0); $table->integer('date_format')->unsigned()->default(0); $table->string('language', 25)->default(''); $table->string('style', 25)->default(''); $table->integer('num_posts')->unsigned()->default(0); $table->integer('last_post')->unsigned()->nullable(); $table->integer('last_search')->unsigned()->nullable(); $table->integer('last_email_sent')->unsigned()->nullable(); $table->integer('last_report_sent')->unsigned()->nullable(); $table->integer('registered')->unsigned()->default(0); $table->string('registration_ip', 35)->default('0.0.0.0'); $table->integer('last_visit')->unsigned()->default(0); $table->string('admin_note', 30)->nullable(); $table->string('activate_string', 80)->nullable(); $table->string('activate_key', 8)->nullable(); $table->string('remember_token')->nullable(); $table->unique('username'); $table->index('registered'); }
public function testAddingText() { $blueprint = new Blueprint('users'); $blueprint->text('foo'); $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); $this->assertEquals(1, count($statements)); $this->assertEquals('alter table users add ( foo varchar2(4000) not null )', $statements[0]); }
/** * Campo TEXTO. */ public function text($column) { $col = parent::text(strtolower($column)); $col->nullable(true); return $col; }
public function testAddingText() { $blueprint = new Blueprint('users'); $blueprint->text('foo'); $statements = $blueprint->toSql($this->getGrammar()); $this->assertEquals(1, count($statements)); $this->assertEquals('alter table "users" add "foo" nvarchar(max) not null', $statements[0]); }
/** * @param Blueprint $table * * @return \Illuminate\Support\Fluent */ public function setDatabaseFieldType(Blueprint $table) { return $table->text($this->getDBKey()); }
/** * Add the UUID and Meta columns to the table. * * @param \Illuminate\Database\Schema\Blueprint * * @return void */ public static function formTable(Blueprint $table) { $table->uuid('uuid'); $table->text('meta'); }
/** * @param Blueprint $table * * @return \Illuminate\Support\Fluent */ public function setDatabaseFieldType(Blueprint $table) { $table->text($this->getDBFilteredColumnKey()); return $table->text($this->getDBKey()); }
/** * @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; }