Create Laravel Sessions Table (#12962)

* create laravel sessions table

* fixing last commit
This commit is contained in:
djamp42 2021-06-19 00:37:50 -04:00 committed by GitHub
parent 24b8bebde7
commit fb36f0bc60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 82 additions and 36 deletions

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSessionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->text('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('sessions');
}
}

View File

@ -792,7 +792,7 @@ ipv6_networks:
PRIMARY: { Name: PRIMARY, Columns: [ipv6_network_id], Unique: true, Type: BTREE }
isis_adjacencies:
Columns:
- { Field: id, Type: int unsigned, 'Null': false, Extra: 'auto_increment' }
- { Field: id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
- { Field: device_id, Type: int, 'Null': false, Extra: '' }
- { Field: port_id, Type: int, 'Null': false, Extra: '' }
- { Field: ifIndex, Type: int, 'Null': false, Extra: '' }
@ -800,15 +800,15 @@ isis_adjacencies:
- { Field: isisISAdjNeighSysType, Type: varchar(128), 'Null': false, Extra: '' }
- { Field: isisISAdjNeighSysID, Type: varchar(128), 'Null': false, Extra: '' }
- { Field: isisISAdjNeighPriority, Type: varchar(128), 'Null': false, Extra: '' }
- { Field: isisISAdjLastUpTime, Type: bigint unsigned, 'Null': false, Extra: '' }
- { Field: isisISAdjLastUpTime, Type: 'bigint unsigned', 'Null': false, Extra: '' }
- { Field: isisISAdjAreaAddress, Type: varchar(128), 'Null': false, Extra: '' }
- { Field: isisISAdjIPAddrType, Type: varchar(128), 'Null': false, Extra: '' }
- { Field: isisISAdjIPAddrAddress, Type: varchar(128), 'Null': false, Extra: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [id], Unique: true, Type: BTREE }
isis_adjacencies_device_id_index: { Name: isis_adjacencies_device_id_index, Columns: [device_id], Unique: false, Type: BTREE }
isis_adjacencies_port_id_index: { Name: isis_adjacencies_port_id_index, Columns: [port_id], Unique: false, Type: BTREE }
isis_adjacencies_ifindex_index: { Name: isis_adjacencies_ifindex_index, Columns: [ifIndex], Unique: false, Type: BTREE }
isis_adjacencies_port_id_index: { Name: isis_adjacencies_port_id_index, Columns: [port_id], Unique: false, Type: BTREE }
juniAtmVp:
Columns:
- { Field: id, Type: 'bigint unsigned', 'Null': false, Extra: auto_increment }
@ -1480,25 +1480,6 @@ ports:
PRIMARY: { Name: PRIMARY, Columns: [port_id], Unique: true, Type: BTREE }
ports_device_id_ifindex_unique: { Name: ports_device_id_ifindex_unique, Columns: [device_id, ifIndex], Unique: true, Type: BTREE }
ports_ifdescr_index: { Name: ports_ifdescr_index, Columns: [ifDescr], Unique: false, Type: BTREE }
port_groups:
Columns:
- { Field: id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
- { Field: name, Type: varchar(255), 'Null': false, Extra: ''}
- { Field: desc, Type: varchar(255), 'Null': true, Extra: ''}
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [id], Unique: true, Type: BTREE }
port_groups_name_unique: { Name: port_groups_name_unique, Columns: [name], Unique: true, Type: BTREE }
port_group_port:
Columns:
- { Field: port_group_id, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: port_id, Type: 'int unsigned', 'Null': false, Extra: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [port_group_id, port_id], Unique: true, Type: BTREE }
port_group_port_port_group_id_index: { Name: port_group_port_port_group_id_index, Columns: [port_group_id], Unique: false, Type: BTREE }
port_group_port_port_id_index: { Name: port_group_port_port_id_index, Columns: [port_id], Unique: false, Type: BTREE }
Constraints:
port_group_port_port_group_id_foreign: { name: port_group_port_port_group_id_foreign, foreign_key: port_group_id, table: port_groups, key: id, extra: 'ON DELETE CASCADE' }
port_group_port_port_id_foreign: { name: port_group_port_port_id_foreign, foreign_key: port_id, table: ports, key: port_id, extra: 'ON DELETE CASCADE' }
ports_adsl:
Columns:
- { Field: port_id, Type: 'int unsigned', 'Null': false, Extra: '' }
@ -1647,6 +1628,39 @@ ports_vlans:
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [port_vlan_id], Unique: true, Type: BTREE }
ports_vlans_device_id_port_id_vlan_unique: { Name: ports_vlans_device_id_port_id_vlan_unique, Columns: [device_id, port_id, vlan], Unique: true, Type: BTREE }
port_groups:
Columns:
- { Field: id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
- { Field: name, Type: varchar(255), 'Null': false, Extra: '' }
- { Field: desc, Type: varchar(255), 'Null': true, Extra: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [id], Unique: true, Type: BTREE }
port_groups_name_unique: { Name: port_groups_name_unique, Columns: [name], Unique: true, Type: BTREE }
port_group_port:
Columns:
- { Field: port_group_id, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: port_id, Type: 'int unsigned', 'Null': false, Extra: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [port_group_id, port_id], Unique: true, Type: BTREE }
port_group_port_port_group_id_index: { Name: port_group_port_port_group_id_index, Columns: [port_group_id], Unique: false, Type: BTREE }
port_group_port_port_id_index: { Name: port_group_port_port_id_index, Columns: [port_id], Unique: false, Type: BTREE }
Constraints:
port_group_port_port_group_id_foreign: { name: port_group_port_port_group_id_foreign, foreign_key: port_group_id, table: port_groups, key: id, extra: 'ON DELETE CASCADE' }
port_group_port_port_id_foreign: { name: port_group_port_port_id_foreign, foreign_key: port_id, table: ports, key: port_id, extra: 'ON DELETE CASCADE' }
printer_supplies:
Columns:
- { Field: supply_id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
- { Field: device_id, Type: 'int unsigned', 'Null': false, Extra: '', Default: '0' }
- { Field: supply_index, Type: int, 'Null': false, Extra: '' }
- { Field: supply_type, Type: varchar(64), 'Null': false, Extra: '' }
- { Field: supply_oid, Type: varchar(64), 'Null': false, Extra: '' }
- { Field: supply_descr, Type: varchar(255), 'Null': false, Extra: '', Default: '' }
- { Field: supply_capacity, Type: int, 'Null': false, Extra: '', Default: '0' }
- { Field: supply_current, Type: int, 'Null': false, Extra: '', Default: '0' }
- { Field: supply_capacity_oid, Type: varchar(64), 'Null': true, Extra: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [supply_id], Unique: true, Type: BTREE }
toner_device_id_index: { Name: toner_device_id_index, Columns: [device_id], Unique: false, Type: BTREE }
processes:
Columns:
- { Field: id, Type: 'bigint unsigned', 'Null': false, Extra: auto_increment }
@ -1845,6 +1859,18 @@ session:
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [session_id], Unique: true, Type: BTREE }
session_session_value_unique: { Name: session_session_value_unique, Columns: [session_value], Unique: true, Type: BTREE }
sessions:
Columns:
- { Field: id, Type: varchar(255), 'Null': false, Extra: '' }
- { Field: user_id, Type: 'bigint unsigned', 'Null': true, Extra: '' }
- { Field: ip_address, Type: varchar(45), 'Null': true, Extra: '' }
- { Field: user_agent, Type: text, 'Null': true, Extra: '' }
- { Field: payload, Type: text, 'Null': false, Extra: '' }
- { Field: last_activity, Type: int, 'Null': false, Extra: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [id], Unique: true, Type: BTREE }
sessions_last_activity_index: { Name: sessions_last_activity_index, Columns: [last_activity], Unique: false, Type: BTREE }
sessions_user_id_index: { Name: sessions_user_id_index, Columns: [user_id], Unique: false, Type: BTREE }
slas:
Columns:
- { Field: sla_id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
@ -2106,17 +2132,3 @@ wireless_sensors:
wireless_sensors_sensor_type_index: { Name: wireless_sensors_sensor_type_index, Columns: [sensor_type], Unique: false, Type: BTREE }
Constraints:
wireless_sensors_device_id_foreign: { name: wireless_sensors_device_id_foreign, foreign_key: device_id, table: devices, key: device_id, extra: 'ON DELETE CASCADE' }
printer_supplies:
Columns:
- { Field: supply_id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
- { Field: device_id, Type: 'int unsigned', 'Null': false, Extra: '', Default: '0' }
- { Field: supply_index, Type: int, 'Null': false, Extra: '' }
- { Field: supply_type, Type: varchar(64), 'Null': false, Extra: '' }
- { Field: supply_oid, Type: varchar(64), 'Null': false, Extra: '' }
- { Field: supply_descr, Type: varchar(255), 'Null': false, Extra: '', Default: '' }
- { Field: supply_capacity, Type: int, 'Null': false, Extra: '', Default: '0' }
- { Field: supply_current, Type: int, 'Null': false, Extra: '', Default: '0' }
- { Field: supply_capacity_oid, Type: varchar(64), 'Null': true, Extra: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [supply_id], Unique: true, Type: BTREE }
toner_device_id_index: { Name: toner_device_id_index, Columns: [device_id], Unique: false, Type: BTREE }