forked from prabhakar267/library-management-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrations, Windows setup instructions, README updates
- Created migrations in place of the SQL dump. - Removed certain manually created timestamp attributes in favour for Laravel's updated_at/created_at. - Added windows installation instructions - Updated .gitignore to NOT ignore the app/storage folder, but added a .gitignore to each of the storage folders so that everything in them is ignored. The reason for this is because not having the app/storage folders at all causes artisan errors.
- Loading branch information
1 parent
fffe37b
commit 47369b7
Showing
19 changed files
with
878 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
/bootstrap/compiled.php | ||
/vendor | ||
app/storage/ | ||
|
||
/public/storage | ||
/storage/*.key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
app/database/migrations/2018_02_24_194028_create_books_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateBooksTable extends Migration { | ||
|
||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('books', function(Blueprint $table) | ||
{ | ||
$table->increments('book_id'); | ||
|
||
$table->string('title', 1000); | ||
$table->string('author', 1000); | ||
$table->text('description'); | ||
$table->integer('category_id')->unsigned(); | ||
$table->integer('added_by')->unsigned(); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('books'); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
app/database/migrations/2018_02_24_194250_create_book_categories_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateBookCategoriesTable extends Migration { | ||
|
||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('book_categories', function(Blueprint $table) | ||
{ | ||
$table->increments('id'); | ||
|
||
$table->string('category', 255); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('book_categories'); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
app/database/migrations/2018_02_24_194315_create_book_issue_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateBookIssueTable extends Migration { | ||
|
||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('book_issue', function(Blueprint $table) | ||
{ | ||
$table->increments('issue_id'); | ||
|
||
$table->integer('book_id'); | ||
$table->tinyInteger('available_status')->default(1); | ||
$table->integer('added_by')->unsigned(); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('book_issue'); | ||
} | ||
|
||
} |
Oops, something went wrong.