Table of Contents
- Bagisto Database
-
Database Schema
- products
- coupons
- product_discounts
- order_coupons
- roles
- orders
- discounts
- customer_addresses
- cart_items
- product_tags
- vendors
- attribute_values
- returns
- cart
- product_vendors
- users
- tags
- shipments
- categories
- attributes_groups
- wishlist
- wishlist_items
- order_items
- transactions
- reviews
- attributes
- attribute_group_values
- customers
- addresses
- payments
- category_products
- Backup
-
Database Schema
Bagisto Database
The Bagisto Database is a fundamental part of Bagisto’s functionality, serving as the backbone for this powerful Laravel-based eCommerce framework. Bagisto has garnered significant attention for providing businesses with a flexible and open-source solution to launch and manage online stores. At the heart of its success is the Bagisto Database, which handles all essential data structures, transactions, and the seamless flow of information. This database is meticulously designed to store, retrieve, and manage every detail of a Bagisto-powered eCommerce platform, from product details to customer data, transaction histories, and beyond.
One of the standout features of the Bagisto Database is its relational structure, tailored for the unique needs of eCommerce operations. The database uses a series of interconnected tables that manage various entities—products, categories, customers, orders, and shipping details, to name a few. Each of these entities is stored in a distinct table within the Bagisto Database, allowing for efficient data organization and retrieval. This relational structure not only makes the database highly scalable but also enables it to accommodate the growing needs of an eCommerce platform as it expands.
The Bagisto Database is crafted with careful attention to data integrity and security, which is crucial in eCommerce applications. Given the sensitive nature of customer data and financial transactions, the database incorporates robust validation mechanisms. Every interaction within the Bagisto Database—from adding a new product to processing an order—is governed by strict rules and validations that prevent data corruption or unauthorized access. This focus on data integrity not only protects customers but also provides store administrators with a reliable framework to manage their operations confidently.
In addition to its relational structure and security features, the Bagisto Database is optimized for performance, ensuring that eCommerce operations run smoothly and efficiently. The database utilizes indexing and caching techniques that allow for fast query processing, which is essential in an environment where hundreds, if not thousands, of data requests are processed every second. Whether a customer is browsing through categories, filtering products, or completing a purchase, the Bagisto Database ensures that these actions are performed with minimal delay, contributing to a seamless user experience.
One of the reasons developers and store owners alike gravitate towards Bagisto is the customizability of the Bagisto Database. Since Bagisto is built on Laravel, developers can easily modify the database schema or create custom tables to suit specific requirements. The Bagisto Database thus serves as a flexible foundation that can be adapted to the unique needs of different businesses, whether they require complex inventory management systems, advanced customer relationship features, or tailored product categorizations. This adaptability is invaluable in a landscape where each eCommerce business has its own distinct requirements.
Another key feature of the Bagisto Database is its ability to support multi-channel and multi-warehouse management. In today’s omnichannel eCommerce environment, businesses need the capability to synchronize inventories and transactions across various platforms and locations. The Bagisto Database addresses this need by providing a centralized repository where all inventory and order information is consolidated. This centralized approach simplifies multi-channel selling and enables store administrators to manage stock levels, track order statuses, and handle returns more efficiently—all within the Bagisto framework.

Database Schema
products
- product_idINTpk
- product_nameVARCHAR(255)__
- product_descriptionTEXT__
- product_priceDECIMAL(10, 2)__
- product_created_atTIMESTAMP__
- product_updated_atTIMESTAMP__
coupons
- coupon_idINTpk
- coupon_codeVARCHAR(255)__
- coupon_descriptionTEXT__
- coupon_discount_percentageDECIMAL(5, 2)__
- coupon_start_dateTIMESTAMP__
- coupon_end_dateTIMESTAMP__
product_discounts
- product_discount_idINTpk
- product_discount_product_idINT__
- product_discount_discount_idINT__
order_coupons
- order_coupon_idINTpk
- order_coupon_order_idINT__
- order_coupon_coupon_idINT__
roles
- role_idINTpk
- role_nameVARCHAR(255)__
- role_descriptionTEXT__
- role_created_atTIMESTAMP__
- role_updated_atTIMESTAMP__
orders
- order_idINTpk
- order_user_idINT__
- order_totalDECIMAL(10, 2)__
- order_statusVARCHAR(255)__
- order_created_atTIMESTAMP__
- order_updated_atTIMESTAMP__
discounts
- discount_idINTpk
- discount_nameVARCHAR(255)__
- discount_descriptionTEXT__
- discount_percentageDECIMAL(5, 2)__
- discount_start_dateTIMESTAMP__
- discount_end_dateTIMESTAMP__
customer_addresses
- customer_address_idINTpk
- customer_address_customer_idINT__
- customer_address_line1VARCHAR(255)__
- customer_address_line2VARCHAR(255)__
- customer_address_cityVARCHAR(255)__
- customer_address_stateVARCHAR(255)__
- customer_address_zipVARCHAR(10)__
- customer_address_countryVARCHAR(255)__
cart_items
- cart_item_idINTpk
- cart_item_cart_idINT__
- cart_item_product_idINT__
- cart_item_quantityINT__
- cart_item_priceDECIMAL(10, 2)__
product_tags
- product_tag_idINTpk
- product_tag_product_idINT__
- product_tag_tag_idINT__
vendors
- vendor_idINTpk
- vendor_nameVARCHAR(255)__
- vendor_emailVARCHAR(255)__
- vendor_created_atTIMESTAMP__
- vendor_updated_atTIMESTAMP__
attribute_values
- attribute_value_idINTpk
- attribute_value_attribute_idINT__
- attribute_value_valueVARCHAR(255)__
returns
- return_idINTpk
- return_order_idINT__
- return_user_idINT__
- return_reasonTEXT__
- return_statusVARCHAR(255)__
- return_created_atTIMESTAMP__
- return_updated_atTIMESTAMP__
cart
- cart_idINTpk
- cart_user_idINT__
- cart_totalDECIMAL(10, 2)__
- cart_statusVARCHAR(255)__
- cart_created_atTIMESTAMP__
- cart_updated_atTIMESTAMP__
product_vendors
- product_vendor_idINTpk
- product_vendor_product_idINT__
- product_vendor_vendor_idINT__
users
- user_idINTpk
- user_nameVARCHAR(255)__
- user_emailVARCHAR(255)__
- user_passwordVARCHAR(255)__
- user_created_atTIMESTAMP__
- user_updated_atTIMESTAMP__
tags
- tag_idINTpk
- tag_nameVARCHAR(255)__
shipments
- shipment_idINTpk
- shipment_order_idINT__
- shipment_address_idINT__
- shipment_statusVARCHAR(255)__
- shipment_created_atTIMESTAMP__
- shipment_updated_atTIMESTAMP__
categories
- category_idINTpk
- category_nameVARCHAR(255)__
- category_descriptionTEXT__
- category_created_atTIMESTAMP__
- category_updated_atTIMESTAMP__
attributes_groups
- attribute_group_idINTpk
- attribute_group_nameVARCHAR(255)__
- attribute_group_descriptionTEXT__
- attribute_group_created_atTIMESTAMP__
- attribute_group_updated_atTIMESTAMP__
wishlist
- wishlist_idINTpk
- wishlist_user_idINT__
- wishlist_created_atTIMESTAMP__
wishlist_items
- wishlist_item_idINTpk
- wishlist_item_wishlist_idINT__
- wishlist_item_product_idINT__
order_items
- order_item_idINTpk
- order_item_order_idINT__
- order_item_product_idINT__
- order_item_quantityINT__
- order_item_priceDECIMAL(10, 2)__
transactions
- transaction_idINTpk
- transaction_order_idINT__
- transaction_payment_idINT__
- transaction_statusVARCHAR(255)__
- transaction_created_atTIMESTAMP__
- transaction_updated_atTIMESTAMP__
reviews
- review_idINTpk
- review_product_idINT__
- review_user_idINT__
- review_ratingINT__
- review_commentTEXT__
- review_created_atTIMESTAMP__
- review_updated_atTIMESTAMP__
attributes
- attribute_idINTpk
- attribute_nameVARCHAR(255)__
- attribute_typeVARCHAR(255)__
- attribute_created_atTIMESTAMP__
- attribute_updated_atTIMESTAMP__
attribute_group_values
- attribute_group_value_idINTpk
- attribute_group_value_attribute_group_idINT__
- attribute_group_value_attribute_idINT__
customers
- customer_idINTpk
- customer_nameVARCHAR(255)__
- customer_emailVARCHAR(255)__
- customer_passwordVARCHAR(255)__
- customer_created_atTIMESTAMP__
- customer_updated_atTIMESTAMP__
addresses
- address_idINTpk
- address_user_idINT__
- address_line1VARCHAR(255)__
- address_line2VARCHAR(255)__
- address_cityVARCHAR(255)__
- address_stateVARCHAR(255)__
- address_zipVARCHAR(10)__
- address_countryVARCHAR(255)__
payments
- payment_idINTpk
- payment_order_idINT__
- payment_methodVARCHAR(255)__
- payment_statusVARCHAR(255)__
- payment_created_atTIMESTAMP__
- payment_updated_atTIMESTAMP__
category_products
- category_product_idINTpk
- category_product_category_idINT__
- category_product_product_idINT__
Backup
Database Export

Users having access to “senEcom”

Clone the Database
Cloning a MySQL database in phpMyAdmin and ensuring the same user privileges are applied to the new database involves two main steps: copying the database and then replicating the user privileges.
1. Clone the Database:
- Log in to phpMyAdmin: Access phpMyAdmin with a user account that has sufficient privileges (e.g., root or a user with global
CREATE,SELECT,INSERT,UPDATE,DELETE,DROPprivileges). - Select the Source Database: In the left-hand panel, click on the database you wish to clone.
- Navigate to Operations: In the main content area, click on the “Operations” tab.
- Copy Database: Under the “Copy database to” section, enter the desired name for the new database in the “To database” field.
- Choose Copy Options: Select “Structure and data” to copy both the table structures and the data. You can also check “CREATE DATABASE before copying” if the new database does not already exist.
- Execute the Copy: Click the “Go” button to initiate the database cloning process.
2. Replicate User Privileges:
After cloning the database, the new database will not automatically inherit the user privileges of the original. You must explicitly grant these privileges:
- Identify Users and Privileges:
- Go to the “Privileges” tab of the original database.
- Note down the users associated with this database and their specific privileges (e.g.,
SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER,DROP, etc.).
- Grant Privileges to the New Database:
- Go to the “Privileges” tab of the newly cloned database.
- For each user identified in step 1:
- If the user already exists in the MySQL server, click the “Edit privileges” icon next to their name.
- If the user does not exist, you will need to create them first by going to the main “Users” tab (from the phpMyAdmin home page) and clicking “Add user account,” then returning to the new database’s “Privileges” tab.
- Grant the necessary privileges to the user for the new database. Ensure these match the privileges they had on the original database.
- Click “Go” to apply the changes.
Alternatively, for replicating user privileges using SQL:
Export User Grants from Original Database.
You can use the SHOW GRANTS command to get the grant statements for a specific user on the original database.
SHOW GRANTS FOR ‘your_username’@’localhost’;
