Questions tagged [database]

Questions related to Magento's MySQL database, for example, the table schema, plain SQL queries or database configuration. For questions about the Magento database access layer, use other tags, like: eav, model, resource-model, collections, install-script. For questions about SQL queries in particular, the SQL tag is appropriate too.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Magento2 detect database deadlock event

I want to detect database deadlock event in my Magento2 (2.3.2) store. Based on that I want to send email to higher authority persons to let them know about deadlock instantly. Any help would be ...
0
votes
0answers
23 views

Magento 1.9 Website loading super slow

My website is loading very slow, I am facing this issue since quite a long time. Suddenly all works properly and then suddenly website loading time goes to 30-40 seconds. quick fix is that if I ...
0
votes
2answers
54 views

How to solve Magento CE 2.3.3 Re-index Issue - SQLSTATE[23000]: Integrity constraint violation error?

How to solve below error, SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '26974-207-1-0-26974' for key 'PRIMARY', query was: INSERT INTO catalog_product_index_eav_temp (...
0
votes
2answers
21 views

Magento 2 : How to add another column to an existing table in the Database?

I created and installed my database via the InstallSchema.php file. I now need to add a new column to one of my tables. In order to get the new column added to the table I deleted the module name ...
0
votes
0answers
16 views

my.cnf MySQL optimize for 2G RAM Magento 1.9

I'm find my.cnf optimized for 2G RAM. It's good configuration for 2G RAM and magento 1.9 and 5.5.56-MariaDB? Server VPS CentOS 7.5 on SSD. #############################################################...
0
votes
1answer
47 views

Magento 2 - How can I write query in Magento

I have a SQL query that joins two tables. SELECT ot.name, org.name from ayakil_organization as org INNER JOIN ayakil_organization_type as ot ON org.type_id = ot.type_id ORDER BY ot.name ASC ...
0
votes
0answers
9 views

Magento2: Date Interval Issue in Custom Report

I am creating a custom product viewed report. I am facing issue in interval column. Below is my collection $collection = $this->customreportsFactory->create()->getCollection(); $collection-...
0
votes
2answers
32 views

Magento 2 : Insert Records in Multiple Table

I have created 2 table : table_1 : id (Primary key) name status table_2 : sub_id (Primary key) id (Foreign key table_1 id) description How to save records in both table using single model file?
0
votes
0answers
6 views

Stuck while saving rule-based product relations (enterprise_targetrule)

I need some help in some project based on Magento EE 1.14. I need to change statuses of big amount records in Catalog->Rule-based Product Ralations, it belongs to enterprise module - ...
1
vote
0answers
14 views

Magento 2 - Update foreign key default to null in UpgradeSchema

I created a foreign key in install schema for my custom table like this: $custom_table->addColumn( 'customer_id', \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, ['nullable' =&...
0
votes
0answers
15 views

Linking sku with images are wrong during bulk upload of product image in magento 2.3.3

as the above screenshot each sku having each image but after uploaded, other sku's images also attached to another sku as like the below screenshot Please help me to find the solution.Thanks ...
0
votes
0answers
16 views

My core_session DB table is getting to heavy very quick

Few months back my website sessions use to get recorded in var/session folder. Suddenly one day I was not able to delete that folder. I also tried using commands but It didnt work. Because of this my ...
0
votes
0answers
27 views

Get products within certain period with limit in sql query Magento 2

I am trying to SQL query (not Magento collection) to get at most 5 products day-wise which lie under my SQL date comparison check . $sql = "SELECT `*` FROM `sales_bestsellers_aggregated_daily` AS `...
0
votes
1answer
26 views

Magento 2.3 - Can't translate product name

After I upgrade my store to latest Magento 2.3.3 version, I can't translate Product Name in the Backend there is not any checkbox or something. Like this is now: So there is not anyway to translate ...
0
votes
2answers
34 views

Magento 2: How to add sub Query on left join

$collection = $this->rmaLogsFactory->create(); $collection->addFieldToSelect('increment_id'); $collection->getSelect()->joinLeft('rma_log AS arl','main_table.increment_id = arl.order_id ...
2
votes
0answers
36 views

Database - Our system detected a lock condition in your database

We are getting an issue with the database. Below is the message we are getting from the server. Our system detected a lock condition in your database. Multiple queries were running too long. ...
2
votes
3answers
92 views

Upgrade magento 1.5.1 to Magento 2.3x

Please how do i upgrade my website from Magento 1.5.1.0 to Magento 2.3x Detailed steps of how to go about it will be appreciated
0
votes
1answer
25 views

difference tables 'quote' and 'quote_adress"

What is the 'quote' table for? And what is the difference between 'quote' and 'quote_adress' table ? Does anyone know what is the difference ? Thanks in advance.
0
votes
1answer
58 views

Rolled back transaction has not been completed correctly while saving product

We have been facing an issue while saving products & categories at the admin end we are getting Rolled back transaction has not been completed correctly. We are using Magento 2.3.1 EE Can anyone ...
-1
votes
1answer
27 views

Issue with saving an image in magento2

I have created a module to upload and save images in magento2 backend. When we upload image for the first time, image gets saved in the backend. But when next time updating another fields and saving ...
0
votes
1answer
29 views

Syntax error or access violation: 1118 Row size too large Reindexing

I am facing : SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, ...
0
votes
1answer
78 views

problem with 'ABSOLUTE_MIN_PASSWORD_LENGTH' - Magento 1.9.4.3

After upgrading Magento to 1.9.4, I have this issue when logging in the website (as a customer). Fatal error: Undefined class constant 'ABSOLUTE_MIN_PASSWORD_LENGTH' in /home/..../public_html/...
0
votes
0answers
13 views

Category not being updates for products

I currently have a cronjob plugin running in the background of my magento 2 installation which imports products from an XML file to the db. The code checks if the product exists, and if it does it ...
0
votes
1answer
30 views

Magento 1.9: Get Product details for a Customer Order

I am trying to get the product_id of each orders that the customer has ordered. One simple way is to fetch all the orders, and for each order have a loop to get all items for each order. Which will ...
0
votes
2answers
30 views

Magento 2 : Automatically rating for product has image

Automatically add four stars on the results page, products page, for all products that do have an image. (Use the database direct to update the stars for the SKUs that have image_count = true) Use ...
0
votes
0answers
14 views

How to fix 'Magento_Store' data-version not available and duplicated entry?

I'm receiving some error messages related to the Magento_Store module when I try to run the downgrade version via Magerun and when I try to change it too, as you can see in these images below. I ...
3
votes
1answer
73 views

How to rename an existing custom table in Magento 2?

I created a table with name "Redeem_blanace" using InstallSchema.php as: class InstallSchema implements InstallSchemaInterface { /** * {@inheritdoc} * @SuppressWarnings(PHPMD....
0
votes
2answers
47 views

Unique constraint violation found after upgrading to Magento 2.3.3

I just recently upgraded from Magento 2.3 to Magento 2.3.3 and whenever I'm trying to run php bin/magento setup:upgrade SSH command it just stick on Unique constraint violation found. Any idea how do ...
0
votes
0answers
18 views

get checkout value for new field Magento 2

I have created a field in Frontend which is a datepicker. I have used a plugin <type name="Magento\Checkout\Block\Checkout\LayoutProcessor"> <plugin name="date_picker" type="Module_Name\...
0
votes
0answers
40 views

Empty additional_attributes Table Magento 2

Please, can someone let me know how I can empty the additional_attributes for all of the products on my site? Due to some import issue, wrong information has been imported and when I exported CSV it ...
0
votes
0answers
14 views

DB script for search and replace a word from entire database

I want to make a DB script for my Magento 2 site. I want it to search a specific word and replace it from another.I have seen other links that show how to replace but those are the queries. I need a ...
0
votes
0answers
17 views

Magento 2 : What tables should be created to make product price Store-view wise? [ Multi Storeview Pricing ]

I want to create functionality like product prices can be set at the store-view level for that I've added one more option as Storeview in a configuration for Stores > Config > Catalog > Catalog > ...
1
vote
1answer
27 views

Sales order vs sales order grid

What is the difference between these two dB tables? I can see for the data, the sales_order_grid appears to be a subset of sales_order. Is this true? What is the purpose of having duplicate tables (I ...
1
vote
0answers
13 views

Unable to create duplicate product in Magento 1.9

I have tried to create a product using the duplicate product in Magento 1.9.3.1. It gives an error as follow
0
votes
1answer
21 views

How to update product name for main website and all store

I am updating the product name and it only affects the En store view I want to update product name for all store views and main website as well. see the sample code below $sku = 'E20630'; $...
1
vote
0answers
53 views

How to set the value of checkbox in gift_message to the database

I have added a custom checkbox to my magneto cart page for gift message. I want to add value 1 to the gift_message table's "remove_tag" column (which i added) if the checkbox is checked. How can i ...
0
votes
1answer
22 views

How does sales_quote and sales_quote_adress table relate?

In the sales_flat_quote table, there is a store_id column. In my perspective the customer order in the front-end (website) and in the back-end, Magento creates each quote for different stores, if my ...
0
votes
0answers
19 views

Magento 2 : How connect Magento with Neo4j Graphical Database

Does any one know how to connect Magento 2 with Neo4j Graphical Database ? There is a PHP client library (composer require graphaware/neo4j-php-client:^4.0) which i have updated in Magento project, ...
0
votes
0answers
8 views

Magento 2.3 mysql version from 5.6 to 5.5 [duplicate]

I know this is an old question but I couldn't find any solution to it. Currently i am having issues with mysql version on my server. i have mysql 5.5 but magento 2.3 requires 5.6. Is there a way to ...
0
votes
1answer
29 views

Unable to find Multi Store Links in magento 2.3

I am new to Magento. I have installed FreeGo theme in my Magento 2.3.x and I've created Multi Stores in Admin Panel but how can I view them? I am unable to find links to view them. Not in the footer, ...
1
vote
1answer
30 views

Magento 2: MySQL Issues

When using Magento2 backend, I’m running into a lot of timeout errors (from cloudflare and from nginx (when cloudflare is disabled) ). These timeout errors happen when i'm trying to insert / update a ...
0
votes
1answer
26 views

Magento 2.3 Mysql Showing Upgrade Compilation Error

When i run php bin/magento setup:upgrade in cmd, then i'm getting this error. anyone can help me, why this error is showing ? website is working fine but i want to fix this error. Plz help if someone ...
0
votes
0answers
31 views

Upgrading Magento 2.2.9 to 2.3.2 missing email_abandoned_cart mysql table

I recently installed a new Magento that was originally 2.2.2 . However the theme i am using then just came out with a updated theme for 2.3.2 so I uploaded that one and upgraded my Magento to 2.3.2 ...
0
votes
0answers
10 views

BSS MultipleStoreViewPricing enbled error

we have a problem after install BSS MultipleStoreViewPricing module ,we trying to enable the extension Stores then Configuration then Catalog.Store View to enable the module. Save Config the problem ...
0
votes
0answers
15 views

BSS MultipleStoreViewPricing error [duplicate]

Dears, I have a problem in Magento 2.3.2 . - BSS MultipleStoreViewPricing Module It shows error I run the below command php bin/magento setup:upgrade Please check attached screenshot of error enter ...
0
votes
0answers
11 views

Constraint “quote_to_store” references exception table in magento 2

After importing database I am getting Exception #0 (Magento\Framework\Exception\InputException): Constraint "quote_to_store" references table that does not exist. unfortunately, no answer found ...
0
votes
1answer
23 views

How to list unused attributes options by sql query

I would like to list all attributes options that our products don't uses. I prefer to use SQL to do that to learn how to work with. Right now i use this query to get the ID of my attributs select * ...
0
votes
0answers
42 views

Magento 2 : How to retrieve 'custom quote params' from quote object after order placed

I want to retrieve custom params saved in the table: "quote_item_option" I have built an observer to capture the purchase event and also to retrieve the quote object i.e public function execute(\...
0
votes
1answer
33 views

How to get data from custom table without using object manager

I want to insert data in custom table "outofstockproductnotification". But before insert data, I want to check if some data like email id and product id is already exist or not in my custom table. I ...
0
votes
0answers
24 views

Assoicated Products relation with Main Products, SQL Query

Our magento store products have three drop downs like color, size & weight. The price of main product changes when we select from size or weight etc. Stuck to run a query to get assoicated ...