Then we will import installed module Flask and flask_mysqldb with it’s helpers. MODIFY `rackid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5 įirst we will create application file app.py into project root directory. `status` enum('Enable','Disable') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Enable' We will also create table rack to store book rack details. MODIFY `publisherid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11 `status` enum('Enable','Disable') NOT NULL We will create table publisher to store book publisher details. MODIFY `authorid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5 We will create table author to store book author details. MODIFY `categoryid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8 `status` enum('Enable','Disable') COLLATE utf8_unicode_ci NOT NULL `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, We will create table category to store books category. MODIFY `issuebookid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4 `status` enum('Issued','Returned','Not Return') COLLATE utf8_unicode_ci NOT NULL `expected_return_date` datetime NOT NULL, `issue_date_time` datetime NOT NULL DEFAULT current_timestamp(), We will create table issued_book to store issue book details. MODIFY `bookid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci `updated_on` datetime NOT NULL DEFAULT current_timestamp() `added_on` datetime NOT NULL DEFAULT current_timestamp(), `status` enum('Enable','Disable') COLLATE utf8_unicode_ci NOT NULL, `isbn` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `picture` varchar(250) COLLATE utf8_unicode_ci NOT NULL, `name` text COLLATE utf8_unicode_ci NOT NULL, We will create table book to store book details. MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6 `role` enum('admin','user') DEFAULT 'admin' ![]() We will create MySQL database library-system and create table user to store users login details to access system. We will install it using the below command:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |