Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
workbiu-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gxx
workbiu-admin
Commits
231d419c
Commit
231d419c
authored
Nov 30, 2017
by
Mirzat
🤕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了Seeder
parent
dfd23afb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
126 deletions
+0
-126
2017_10_12_140450_entrust_setup_tables.php
...ase/migrations/2017_10_12_140450_entrust_setup_tables.php
+0
-71
2017_11_11_114717_create_user_infos_table.php
.../migrations/2017_11_11_114717_create_user_infos_table.php
+0
-38
DatabaseSeeder.php
database/seeds/DatabaseSeeder.php
+0
-1
UserInfoTableSeeder.php
database/seeds/UserInfoTableSeeder.php
+0
-16
No files found.
database/migrations/2017_10_12_140450_entrust_setup_tables.php
deleted
100644 → 0
View file @
dfd23afb
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
class
EntrustSetupTables
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
// Create table for storing roles
Schema
::
create
(
'roles'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
)
->
unique
();
$table
->
string
(
'display_name'
)
->
nullable
();
$table
->
string
(
'description'
)
->
nullable
();
$table
->
timestamps
();
});
// Create table for associating roles to users (Many-to-Many)
Schema
::
create
(
'role_user'
,
function
(
Blueprint
$table
)
{
$table
->
integer
(
'user_id'
)
->
unsigned
();
$table
->
integer
(
'role_id'
)
->
unsigned
();
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
)
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
$table
->
foreign
(
'role_id'
)
->
references
(
'id'
)
->
on
(
'roles'
)
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
$table
->
primary
([
'user_id'
,
'role_id'
]);
});
// Create table for storing permissions
Schema
::
create
(
'permissions'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
)
->
unique
();
$table
->
string
(
'display_name'
)
->
nullable
();
$table
->
string
(
'description'
)
->
nullable
();
$table
->
timestamps
();
});
// Create table for associating permissions to roles (Many-to-Many)
Schema
::
create
(
'permission_role'
,
function
(
Blueprint
$table
)
{
$table
->
integer
(
'permission_id'
)
->
unsigned
();
$table
->
integer
(
'role_id'
)
->
unsigned
();
$table
->
foreign
(
'permission_id'
)
->
references
(
'id'
)
->
on
(
'permissions'
)
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
$table
->
foreign
(
'role_id'
)
->
references
(
'id'
)
->
on
(
'roles'
)
->
onUpdate
(
'cascade'
)
->
onDelete
(
'cascade'
);
$table
->
primary
([
'permission_id'
,
'role_id'
]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
drop
(
'permission_role'
);
Schema
::
drop
(
'permissions'
);
Schema
::
drop
(
'role_user'
);
Schema
::
drop
(
'roles'
);
}
}
database/migrations/2017_11_11_114717_create_user_infos_table.php
deleted
100644 → 0
View file @
dfd23afb
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateUserInfosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'user_infos'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'user_id'
);
$table
->
string
(
'terminal'
);
$table
->
string
(
'manner'
);
$table
->
dateTime
(
'last_login_time'
);
$table
->
boolean
(
'return_visit'
)
->
default
(
0
);
$table
->
longText
(
'page_retention_time'
)
->
nullabel
();
$table
->
longText
(
'user_engagement'
)
->
nullabel
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'user_infos'
);
}
}
database/seeds/DatabaseSeeder.php
View file @
231d419c
...
...
@@ -12,7 +12,6 @@ class DatabaseSeeder extends Seeder
public
function
run
()
{
// $this->call(UsersTableSeeder::class);
$this
->
call
(
UserInfoTableSeeder
::
class
);
$this
->
call
(
UserInfosTableSeeder
::
class
);
$this
->
call
(
PermissionsTableSeeder
::
class
);
}
...
...
database/seeds/UserInfoTableSeeder.php
deleted
100644 → 0
View file @
dfd23afb
<?php
use
Illuminate\Database\Seeder
;
class
UserInfoTableSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
factory
(
\App\Models\UserInfo
::
class
,
10
)
->
create
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment