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
0 answers
25 views

How I can seed products into database directly?

Sometimes I have magento installations where my coleagues do edit files in ./vendor folder. Therefore, I cannoty use the existing seeder. Therefore, using magento's seeder will require extra ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
20 views

Magento 2 DB Locks

I'm running Magento 2 and since a recent upgrade my DB seems to be having DB locks quite a lot, yesterday it happened at least 3 times, my developers are unable to find the source of the problem and ...
Sparetoolparts's user avatar
0 votes
1 answer
25 views

Magento 2.4.3 - The store that was requested wasn't found. Verify the store and try again

when customers are trying to create a profile on our client's website they get the following error message: "The store that was requested wasn't found. Verify the store and try again." After ...
Jan-petter Havna's user avatar
0 votes
0 answers
33 views

Unable to run Magento site on nginx

Using Debian 11, I installed PHP 8.1, PHP-FPM 8.1, Mysql 8, NGINX, Elasticsearch, Magento2 via composer. Now I am able to see the localhost welcome Nginx page and I cant navigate to Magento site. I ...
Leo's user avatar
  • 1
0 votes
1 answer
21 views

Products Using Placeholder Image in Category View

A script was run to clear unused product images to free up space on the server, but instead of clearing unused images, it accidentally cleared a portion of images currently in use by products. The ...
Bluestocking's user avatar
0 votes
2 answers
42 views

How I can create a Model and Save it using Magento2?

I made a seeder custom command in order to populate multiple models for my developemtn easyness: <?php namespace MageGuide\FirstModule\Console\Command; use MageGuide\FirstModule\Model\BlogPost; ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
34 views

How I can reference product SKU as foreign key reference?

In my db_schema.xml I made a table with a pivot one: <?xml version="1.0"?> <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&...
Dimitrios Desyllas's user avatar
0 votes
1 answer
74 views

Magento 2.4.6 Opimize database tables

I'm using Magento 2.4.6, I want optimize the database, Some tables have large entries. report_viewed_product_aggregated_daily report_viewed_product_aggregated_monthly ...
MP Raj's user avatar
  • 384
0 votes
0 answers
32 views

How to sort products in Magento by new from date?

I wanted to sort products by new from date , please see the query but it is not working perfectly $collection->getSelect() ->joinLeft( ['catalog_product_entity_datetime' =>...
Mark's user avatar
  • 43
0 votes
1 answer
27 views

Magento 2 PWA setup with Adobe guidance but product images not shown

Refer this https://developer.adobe.com/commerce/pwa-studio/tutorials/ Run Below command php bin/magento catalog:images:resize only shown accessories category images and home page images. if any has an ...
Rahul Prajapati's user avatar
0 votes
0 answers
36 views

Redis consuming to much memory in magento2.4.3

I have installed Redis for page cache and session storage here is the setting : but it takes much memory and the website is slow also it gives the times a dataset is loading in memory error please ...
hamza abbasi's user avatar
0 votes
1 answer
16 views

Export of products in CSV files

Does anyone know why the CSV export file does not appear, when I make the export I get the notification that it is ready, however, the file is not found, this should appear with the date on which the ...
Erick Vernaza's user avatar
0 votes
2 answers
44 views

Magento 2 Database optimization need help, database keep growing!

Magento 2 tables data is showing a total size "5,115,687" , I want to truncate some large tables please guide me can I truncate the following tables without affecting store functionality: ...
hamza abbasi's user avatar
0 votes
0 answers
28 views

Integrity constraint violation: 1062 Duplicate entry '5300-200-0' for key 'CATALOG_PRODUCT_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID',

After Upgrade Magento version to 2.4.6-p1 , I am getting error on executing setup:upgrade command : Error : Unable to apply data patch Magento\Catalog\Setup\Patch\Data\...
Kishor 6ugani's user avatar
0 votes
1 answer
26 views

Product Attribute not display under Catalog Product List conditions

I created attribute for configurable products. I want to create a page using that attribute. I selected the Catalog Product List option in widget. But i can not see added attribute in the dropdown. ...
Daga's user avatar
  • 11
0 votes
0 answers
20 views

Mapping backorders/allow_backorders & use_config_backorders (Akeneo)

I've not been succesful in mapping these values, as these are not standard product attributes. backorders (or allow_backorders) use_config_backorders I would not mind setting the default value of ...
Bram's user avatar
  • 1
1 vote
1 answer
32 views

How to insert data in database of custom checkout step fields in magento 2.4.6

I have created an new checkout step that has one input field. I want the value of that field to be stored in a database.
Yameen's user avatar
  • 38
0 votes
2 answers
31 views

Add index in existing index in magento2

I want to add an index to an existing index using Setup/UpgradeSchema: $connection = $setup->getConnection(); $tableName = $setup->getTable('sales_order_grid'); $indexName = '...
Jimit Bhavsar's user avatar
0 votes
2 answers
39 views

Magento2: How to uninstall sample data from database

Does anyone know how we can remove the sample data from the database? Please let me know if you have any suggestions. Note: I don't want to remove the sample data modules, I'm looking for something ...
Suresh Chikani's user avatar
2 votes
1 answer
27 views

Admin customer spam

I removed customer spam from the database. But, the admin customer display still shows those customers.
Jim Todd's user avatar
0 votes
1 answer
38 views

Is it possible to get Country Name using Select Query in Magento 2 DB?

I am trying to get the list of customers from the database directly using Mysql Query. SELECT ce.email As Email, ce.firstname As Firstname, ce.lastname As Lastname, COALESCE(NULLIF(cae.country_id,''), ...
Chirag Prajapati's user avatar
1 vote
0 answers
30 views

Integrity constraint violation error magento2.4.3

I am getting this error: main.ERROR: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'last_visit_at' cannot be null, query was: INSERT INTO customer_visitor (customer_id, session_id, ...
hamza abbasi's user avatar
0 votes
2 answers
32 views

Magento 2 - Database values to push in production using Git

I want to move system Configuration values and values stored in database to production server using Git. Can anyone let me know how can I push Admin Changes to Production using Git. Is it possible ...
user3411's user avatar
0 votes
2 answers
199 views

custom attribute value not save in the Database

<?php declare(strict_types=1); namespace Vendor\Module\Setup\Patch\Data; use Magento\Eav\Model\Config; use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory; use Magento\Eav\...
Nabeel shahbaz's user avatar
0 votes
0 answers
33 views

When a simple product is removed from grouped product in admin panel in Mage 2.4.5. Here comes issue

In Magento 2.4.5 vanilla when creating a new grouped product, let's suppose this grouped product already has 20 simple products. Step # 1: Add the 21th product in grouped product table in product edit ...
HamzaKhalid273's user avatar
0 votes
1 answer
36 views

Setup Production Database on Staging server in Magento 2.4

I downloaded the production database. Now I want to setup the database on the staging server. So what sanitize process I have to apply on the database before uploading to the staging server.
Kushal Dani's user avatar
  • 2,064
0 votes
1 answer
158 views

Magento CE breaks with MariaDB 10.6.13 galera cluster

I run a Magento CE store with 3 DB servers (galera cluster). When upgrading Magento from 2.3.4 to Magento 2.4.6, also upgraded MariaDB from 10.4 to 10.6, and PHP from 7.4 to 8.1, to match Magento ...
MAX's user avatar
  • 1
0 votes
0 answers
27 views

How to merge 2 websites into 1 website with 2 stores

I have 2 Magento websites (Web A and Web B with different Magento installations) but I need a single Magento installation with 2 websites how to merge 2 different websites to a single installation ...
Pawankumar's user avatar
0 votes
1 answer
54 views

Deleting specific orders and related data via SQL

I am currently looking at deleting old order-related data (includes order, shipment, invoice, creditmemo and payments) from a Magento installation (currently 2.4.5-p1). I am ignoring the aggregated ...
fearfelt's user avatar
0 votes
2 answers
45 views

sudo php bin/magento module:status didn't run?

I was trying to run this command but the error raised like this PHP Warning: require(/var/www/medical/bin/../app/bootstrap.php): Failed to open stream: No such file or directory in /var/www/medical/...
Ansari's user avatar
  • 435
0 votes
0 answers
21 views

Import and update wholesale prices with different price ranges according to quantity in Magento

I want to update the prices for wholesale customer group from csv. The csv format is like this How can I update these to database? Or help me by letting me know the table and column names where the ...
MD TAREK HOSSEN's user avatar
0 votes
2 answers
45 views

Scable qty going to nagative value

In Magento2 Scalable qty going to nagative value. Is there anyone have idea which cases Scalable Qty going to nagative value?
Arti patel's user avatar
0 votes
1 answer
34 views

Magento2: get values to databse

I'm trying to get values from the popup model of radio buttons into the database and I'm not getting that, what am I doing wrong? BLOCK FILE <?php namespace vendor\ThreeYearOrders\Block; use ...
Bayzel's user avatar
  • 163
0 votes
0 answers
13 views

Magento2 Image not saving into custom db table

Created a form fields are saving data into db table but image data is not getting saved. $data = $this->getRequest()->getPostValue(); Tried to print but it dose not showing image data. My ...
Naman Bapna's user avatar
0 votes
1 answer
29 views

Custom sql to get Magento2 EE reward point data

I am trying to write a custom sql that will provide to me data related to the Magento2 EE reward points. My issue is that my queries seem to be showing 0 as the result which can not be because when I ...
Jayreis's user avatar
  • 685
0 votes
2 answers
44 views

Where is customer firstname, lastname stored in magento 1 table?

Could you let me know where is customer firstname and lastname being stored in magento 1 database table ? I didn't seem to find them in customer_address_entity or customer_entity. I wanted to select ...
Rejith's user avatar
  • 169
0 votes
1 answer
35 views

mysql query throwing 500 error

I have the below code but its throwing a 500 error and I can not get to the server logs to find the actual error. Nor is the page giving a better error message. Hoping someone could spot my error ...
Jayreis's user avatar
  • 685
0 votes
0 answers
40 views

Check if database address value is empty in $collection?

How can I check if the field "company" contains a value or not, and set another value ("not a company" for instance) if empty? class OrdersGrid { public function afterGetReport($...
Aknot's user avatar
  • 314
0 votes
1 answer
28 views

Connect external system to M2EE database

My question is if I want to connect a php file that lives externally from Magento meaning not on the Magento server. Where would I find a tutorial I am not looking for how to write a query. I also ...
Jayreis's user avatar
  • 685
0 votes
0 answers
24 views

Unable to add tracking #

Is there anyone available for the help please. I was trying to add tracking # into the order but I'm giving an error. Complete process is here: https://drive.google.com/file/d/...
Sufyan Ahmed's user avatar
0 votes
3 answers
37 views

Magento layout file not called?

This is my Controller Index.php <?php namespace Hikmadh\Menu\Controller\Adminhtml\Product; class Index extends \Magento\Framework\App\Action\Action { /** @var \Magento\Framework\View\Result\...
Thoubik's user avatar
  • 118
0 votes
0 answers
100 views

Nginx configuration test failed

When i tries to run sudo nginx -t this error was acquired nginx: [emerg] open() "/var/www/html/myshop/nginx.conf.sample" failed (2: No such file or directory) in /etc/nginx/sites-enabled/...
Thoubik's user avatar
  • 118
0 votes
0 answers
24 views

Error 1452 when import database

when i import database to new server this error shown -- -- Constraints for table `catalog_product_entity_media_gallery_value_to_entity` -- ALTER TABLE `...
P00ZHAN .'s user avatar
0 votes
2 answers
60 views

MYSQL command to export magent 2 tables in CSV format

Hi Guys I need to export the Magento 2 sales order table in CSV format with the fallowing requirements. Could you guys help me. Thanks. You must Export from your Database with these exact settings: ...
Shaik Farooq's user avatar
0 votes
1 answer
102 views

How to add roles in images of product with mysql database?

Is it possible insert not update (update is simple) image roles (base, small , thumnail) in catalog_product_entity_varchar table if in the table missing attribute row for the products images
Robinio's user avatar
  • 749
0 votes
1 answer
20 views

Error on constructor while saving form into the database

Here is my save.php <?php namespace Mageplaza\Menu\Controller\Adminhtml\Post; use Mageplaza\Menu\Model\PostFactory; use Magento\Backend\App\Action; use Magento\Framework\App\Action\Context; use ...
Thoubik's user avatar
  • 118
0 votes
0 answers
14 views

Magento2 : Php script to query result data to send email in excel format

Iam having select query to fetch data, based on this data to send mail in excel sheet for my magento project.
User0434's user avatar
  • 1,123
0 votes
2 answers
491 views

Magento 2 setup upgrade throwing error . After version upgraded from 2.3.6-p1 to 2.4.5-p1

I got following error while running upgrade command Warning: Undefined array key "inventory_source" in /var/www/html/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on ...
Jaisa's user avatar
  • 2,522
0 votes
0 answers
32 views

Can work same database with magento old version and upgrade version?

Here, the old code means Magento2.3.4, and the new code means magento upgraded v2.4.4-p2. Recently, I upgraded a site from Magento 2.3.4 to v2.4.4-p2, and I have much customization. Does Magento work ...
Dipak Prajapati's user avatar
0 votes
1 answer
89 views

Magento 2: How to export tables by name using REST API

How can i export tables using the REST API. I've looked through the devdocs and dont see any endpoints to do this? The tables i want are standard ones like customer_entity and sales_order.
Amethyst1's user avatar

1
2 3 4 5
66