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
12 views

How to save Image data using Magento 2.4.2?

I have created an input type image using Magento 2 Extension and want to save Image data. Now I want to save Image data in Magento 2 Database Custom table. I have created custom table and run Ajax ...
0
votes
1answer
13 views

Magento 2 (ver. 2.3.6) reindex not working

I have a single view Magento 2, with about 5000 products on it, running on a cloud hosting with 4GB RAM. What happens is that every time the reindex process is triggered (by the cron job or by hand) ...
0
votes
0answers
14 views

Need to manually write in the DB in patch_list table a particular CMS block

I have just been asked to do this, and me and my colleagues have no idea, any help would be greatly appreciated!
0
votes
1answer
19 views

How to overwrite existing DB value with NULL value?

On an admin grid form I have a checkbox. If the checkbox is checked the form shows additional data fields. If it is not checked the additional fields are hidden. When the form is saved, the data from ...
0
votes
1answer
40 views

Integration ID is not specified or invalid when authorising

On a Magento v2.4.1 site, when trying to authorise an existing integration record, I'm receiving the error "Integration ID is not specified or is invalid". I verified that the record does ...
0
votes
1answer
18 views

magento 2- showing special price products on the product list page not working with flat catalog tables

I have created functionality to show all the special price products on the product list page by extending the core class \Magento\Catalog\Model\Layer. This functionality is working fine with default ...
0
votes
2answers
20 views

Magento 1 Sql query for product name, sku and quantity

I am using Magento 1. I want to fetch product names, SKUs, and stock quantity with SQL queries. If anyone knows please let me know. Thanks in advance.
1
vote
1answer
38 views

Magento 2 | Reindex very slow in local server

On my server with: MariaDB 10.4 PHP 7.4 Elasticsearch 7.9.1 Elasticsuite 2.10.0 I am trying to relaunch the full reindex for Magento2 but I have seen that catalog_category_product is very slow, its ...
0
votes
1answer
26 views

Get specific columns from Left Join

I am trying to join two tables like below $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $collection = $objectManager->get('Advance\Module\Model\Method') ->...
0
votes
0answers
16 views

How to create a website, store and storeview using data patch in magento2.4.2

I want to create a website, store and storeview using data patch in magento2.4.2. How to do that. Thanks
1
vote
0answers
10 views

SQL maxium innodb size issue

I am installing smtp extension suddenly I am facing with below -- Mysql -- error message https://prnt.sc/127cedv SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum ...
0
votes
1answer
7 views

MySQL Query of catalog_product_super_link filtered by attribute_set_id

I want to export all fields from the catalog_product_super_link table, but filtered to exclude any products that have have a certain attribute_set (31 in this case). This post (MySQL Query filtered by ...
0
votes
1answer
11 views

magento 2: how to checked use default value for product status programmtically?

I have to update and checked checkbox for use default field for product status. But I do not know how to update and checked that checkbox ? here is my code $objectManager = \Magento\Framework\App\...
0
votes
1answer
11 views

upload porto theme with existing database in Magento 2.3.5

can I upload the porto theme and use my old products hence the dummy data will be removed and my old data will be shown... is this possiable furthermore will my old categories appear in the theme or ...
0
votes
1answer
17 views

Is it right or wrong to create tables in the magento 2 database?

Guys I'm new to magento development and I'm trying to learn how to create basic modules and I'm trying to create a module that registers some customer information and then returns it to the ...
0
votes
1answer
44 views

problem in facebook pixel module for magento2.4

we installed the facebook pixel module for magento2.4. so far everything perfect. But when I enter the product registration and saved, the error below occurs Error: Call to undefined method Facebook\...
0
votes
1answer
14 views

Magento 2 Change custom option name with mySql

I have this line which I can use to update the price of a custom product option. UPDATE `catalog_product_option_type_title` a JOIN `catalog_product_option_type_price` b ON a.option_type_id = b....
0
votes
1answer
34 views

How to import 3 tables dump into database using script?

I want to include 3 tables SQL dump into that database, how to add it by using a custom module or script or any best practice.
0
votes
0answers
18 views

Magento 2.4.1 EE | Customer custom attribute created from admin but not saving value in DB

I am facing an issue with Magento2 EE website (Magento ver. 2.4.1) for customer custom attribute. Found similar question here as well but not with any solutions. When I create a new customer attribute ...
0
votes
0answers
17 views

Serialization failure: 1213 Deadlock found when trying to get lock

We are using https://github.com/firegento/FireGento_FastSimpleImport2 to import product using CSV and we end up in getting this exception. ["SQLSTATE[40001]: Serialization failure: 1213 Deadlock ...
0
votes
0answers
29 views

MariaDB crashing every few days

I'm using Magento2 with MariaDB 10.3.27 on Debian 10.8 and i'm experiencing MariaDB crash every few days. I have no idea what can cause those unexpected crashes. I'm sending my config and crash logs. ...
0
votes
0answers
12 views

Error on mysql only on front page

I'm using  Magento 2.3.6-p1 In Cli commands everything  works fine. I can ran setup:upgrade, compilation, content:deploy, etc. But, when I go to www.mystore.com I get the following: 2 exception(s): ...
0
votes
1answer
33 views

Magento 2 - Is it safe to remove the DEFINER=.. statement from sqldump?

I have a web server that serves Magento2 and a MySQL Server that hosts the database and both of these servers are in a single ubuntu instance. I would like to move the MySQL server to a separate RDS ...
1
vote
2answers
22 views

Add collection filter from json field

I want to filter custom collections with JSON field filters. In the below image, there are 2 fields category and product. They have JSON value. I am able to get collection by Direct SQL query by ...
0
votes
1answer
26 views

Magento 2 get categories by store Query

I want to get all enable categories for specific store from query in Magento 2 database. As I tried from database query from table catalog_category_entity_int SELECT * FROM `...
0
votes
3answers
39 views

How to Fetch/Insert in Database without Sql Query

I am trying to get customers from the database whose order was cancelled, and I am able to do this via Query. But I think the standard way should be without using Queries. So is there a way I can ...
0
votes
1answer
39 views

php bin/magento setup:db-declaration:generate-whitelist

I had some issues when updating an module, I revived an error and after looking it up It was recomaneded to do php bin/magento setup:db-declaration:generate-whitelist. AFter i did this I was able to ...
0
votes
0answers
18 views

Magento Cloud Too many mysql connection error

I'm getting error on the Magento Cloud, ERROR 1040 (HY000): Too many connections Doesn any one now how i can restart the mysql or just know the reason of that, like where i can find the mysql logs ...
0
votes
1answer
18 views

How to confirm and approve a customer account via Database in bulk Magento 2

How can we change a customer account confirm and approve a customer account via Database in magento 2
0
votes
0answers
22 views

Magento 2.3.6 Commerce : Missing field used into WHERE clause on catalog_product_entity_media_gallery_value_to_entity (entity_id)

On the category page I have this error : 2 exception(s): Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity.entity_id' in 'where clause', query ...
1
vote
1answer
37 views

Magento 2 Best way to merge specific DB tables and data from one database to another

We have two enviroments Staging and Production, for Magento 2.3.5. At the moment these two enviroments have different database structure, meaning that we can't just dump the entire DB and restore it ...
0
votes
1answer
25 views

How to add products in cart using REST API in Magento 2?

I want to add products in cart in Magento 2 using Rest API I have created a controller and using this code. <?php $userData = array("username" => "admin", "password&...
0
votes
1answer
93 views

Port must be configured within host parameter in Magento 2

I received the following error, "Port must be configured within host parameter. like localhost:3306 in /var/www/html/dbm2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php" when trying to go ...
0
votes
0answers
9 views

magento 2 Cannot add foreign key constraint while importing admin_user table

I'm trying to export admin_user table from one database and importing it into another database. But it shows the below issue. #1215 - Cannot add foreign key constraint I have also disabled foreign ...
0
votes
0answers
12 views

Magento 2.3 - How to add a field for serial number to admin shipping screen?

Need to implement the addition of a "serial number" field on the Admin panel of M2.3. Once a customer purchases an item, we pick a random, serialized item from stock and package it for ...
0
votes
2answers
43 views

How can I delete all pending review on Magento 2?

On My Magento 2 Site guest review was enabled, Someone spam review around several hundred thousand, I need to delete all pending reviews from the database. I am not interested to truncate reviews ...
0
votes
1answer
14 views

SQL is_in_stock field not updating to Website

I am updating is_in_stock field in cataloginventory_stock_item as follows: UPDATE cataloginventory_stock_item ci SET ci.is_in_stock = CASE WHEN ci.qty = 0 THEN 0 WHEN ci.qty > 0 THEN 1 END WHERE ...
0
votes
1answer
37 views

How to start with Magento 2 ? for newbs in Magento 2

I really know this might be off-topic, but I already, "red" the https://magento.com/ https://devdocs.magento.com/ I just have started in a company with 50+ employees and most of them are ...
0
votes
0answers
16 views

Magento 2.4 database table catalog_product_attribute_cl has grown to millions [duplicate]

I've just noticed that the catalog_product_attribute_cl database table has 26 millions lines. What is the purpose of this table, is this normal? can i safely delete all those rows?
0
votes
1answer
14 views

How to export all URL rewrites in a CSV?

I would like to export all my URL rewrites in a CSV, via Magento 2 admin panel I can't do it. I followed this guide below but I didn't find anything native. https://docs.magento.com/user-guide/...
1
vote
1answer
74 views

Magento2 - Integrity constraint violation 1062 ALTER TABLE on setup:upgrade

Magento 2.3.5 Mariadb 10.2 PHP 7.2 We are hitting the constraint violation error below when running: php bin/magento setup:upgrade catalog_product_entity_varchar ran out of space at 2147483647 so we ...
0
votes
2answers
30 views

Magento 2 - how to re-install missing foreign-key constraints?

I am using a third party extension. I noticed that a constraint is missing by comparing with a fresh installation. This causes a bug when deleting an item of the extension. Is there a command which is ...
0
votes
1answer
25 views

Magento 2 - Foreign Key Constraint does not delete record

I am using the extension Amasty Product Attachments. If I add an attachment to a product and then delete that attachment from Amasty -> Product Attachments -> Attachments Management, then I can'...
0
votes
3answers
48 views

How to check installed extensions on database magento 2

I need to check installed module on database table I hope your help Thanks Thomas
4
votes
3answers
99 views

How to manage Magento store with 60 Million Products

I have completed the product import process of 60 Million products in Magento 2. But products are not visible on the front-end, while debugging this I found that re-indexing of products is still in ...
0
votes
0answers
13 views

Class does not exist error after Mysql upgradation in Magento 2.2.4

Recently we have done Mysql upgradation from 5.6 to 5.7.31 in Magento EE 2.2.4, we have Android application, when logging in to new installed application it is giving error(given below) for first time ...
0
votes
0answers
7 views

Magento 1.7 - SEO URLs - Rewrite URL in Sitemap for Products

we have Magento 1.7 in use. We would like to read our SEO URL for the products from the database. We have found that the attributes for "url_key" do not match the URL from the sitemap of ...
0
votes
1answer
35 views

ResourceModel->delete() not deleting row in custom table

I am writing a module which imports additional product information into a custom table with SKU as the PK. If there is already a row in the custom table regarding the SKU, i have to delete the old row ...
0
votes
0answers
8 views

magento 2 set quote_item custom column in controller

I want to update my custom column name order_item_note in a quote_item table. I have the below data. Product Id, and Text to insert. How to update the column order_item_note without raw sql I have ...
0
votes
1answer
29 views

Magento 2 SSH reindexing not working? [duplicate]

I just installed a Magento 2.3.6 version. and I tried to run the Command Reindexing but it's not working. I tried with diff commands like cache clear and flush none of the commands are not working ...

1
2 3 4 5
71