mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-23 20:10:52 +00:00
Creating users_per_item migration
This commit is contained in:
parent
ba48e30a81
commit
f7c00662d5
33
database/migrations/2018_09_10_233609_users_per_item.php
Normal file
33
database/migrations/2018_09_10_233609_users_per_item.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class UsersPerItem extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users_per_item', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('productID');
|
||||
$table->integer('userID');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users_per_item');
|
||||
}
|
||||
}
|
10
readme.md
10
readme.md
@ -4,11 +4,11 @@ Cada usuário, identificado por e-mail, pode ter outros amigos
|
||||
|
||||
## DB
|
||||
|
||||
usuário(nome, email)
|
||||
product[site/software](nome, admin)
|
||||
productUsers(productID, userID)
|
||||
item[licença](nome, productID, usedBy, usedSince)
|
||||
waiting(userID, itemID, waitingSince)
|
||||
[x] usuário(nome, email)
|
||||
[x] product[site/software](nome, admin)
|
||||
[ ] usersPerItem(productID, userID)
|
||||
[x] item[licença](nome, productID, usedBy, usedSince)
|
||||
[ ] waiting(userID, itemID, waitingSince)
|
||||
|
||||
## VIEWS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user