| @@ 8-26 (lines=19) @@ | ||
| 5 | use Illuminate\Database\Migrations\Migration; |
|
| 6 | use Illuminate\Database\Schema\Blueprint; |
|
| 7 | ||
| 8 | class CreateInlineQueryTable extends Migration |
|
| 9 | { |
|
| 10 | public function up() |
|
| 11 | { |
|
| 12 | Schema::create(config('phptelegrambot.database.prefix', '') . 'inline_query', static function (Blueprint $table) { |
|
| 13 | $table->bigInteger('id')->unsigned()->primary()->comment('Unique identifier for this query'); |
|
| 14 | $table->bigInteger('user_id')->nullable()->index('user_id')->comment('Unique user identifier'); |
|
| 15 | $table->char('location')->nullable()->comment('Location of the user'); |
|
| 16 | $table->text('query', 65535)->comment('Text of the query'); |
|
| 17 | $table->char('offset')->nullable()->comment('Offset of the result'); |
|
| 18 | $table->dateTime('created_at')->nullable()->comment('Entry date creation'); |
|
| 19 | }); |
|
| 20 | } |
|
| 21 | ||
| 22 | public function down() |
|
| 23 | { |
|
| 24 | Schema::dropIfExists(config('phptelegrambot.database.prefix', '') . 'inline_query'); |
|
| 25 | } |
|
| 26 | } |
|
| 27 | ||
| @@ 8-25 (lines=18) @@ | ||
| 5 | use Illuminate\Database\Migrations\Migration; |
|
| 6 | use Illuminate\Database\Schema\Blueprint; |
|
| 7 | ||
| 8 | class CreateShippingQueryTable extends Migration |
|
| 9 | { |
|
| 10 | public function up() |
|
| 11 | { |
|
| 12 | Schema::create(config('phptelegrambot.database.prefix', '') . 'shipping_query', static function (Blueprint $table) { |
|
| 13 | $table->bigInteger('id')->primary()->unsigned()->comment('Unique query identifier'); |
|
| 14 | $table->bigInteger('user_id')->index('user_id')->nullable()->comment('User who sent the query'); |
|
| 15 | $table->char ('invoice_payload', 255)->default('')->comment ('Bot specified invoice payload'); |
|
| 16 | $table->char ('shipping_address', 255)->default('')->comment ('User specified shipping address'); |
|
| 17 | $table->timestamp('created_at')->nullable()->comment ('Entry date creation'); |
|
| 18 | }); |
|
| 19 | } |
|
| 20 | ||
| 21 | public function down() |
|
| 22 | { |
|
| 23 | Schema::dropIfExists(config('phptelegrambot.database.prefix', '') . 'shipping_query'); |
|
| 24 | } |
|
| 25 | } |
|
| 26 | ||