Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2017-01-21 16:39:50 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
8f19231ed5c244c3d00c7190426565f3de953283
8f19231e
1 parent
5c60f27a
Added options to use database cache & sessions
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
0 deletions
database/migrations/2017_01_21_163556_create_cache_table.php
database/migrations/2017_01_21_163602_create_sessions_table.php
database/migrations/2017_01_21_163556_create_cache_table.php
0 → 100644
View file @
8f19231
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateCacheTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'cache'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'key'
)
->
unique
();
$table
->
text
(
'value'
);
$table
->
integer
(
'expiration'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'cache'
);
}
}
database/migrations/2017_01_21_163602_create_sessions_table.php
0 → 100644
View file @
8f19231
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateSessionsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'sessions'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'id'
)
->
unique
();
$table
->
integer
(
'user_id'
)
->
nullable
();
$table
->
string
(
'ip_address'
,
45
)
->
nullable
();
$table
->
text
(
'user_agent'
)
->
nullable
();
$table
->
text
(
'payload'
);
$table
->
integer
(
'last_activity'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'sessions'
);
}
}
Please
register
or
sign in
to post a comment