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
1answer
18 views

Magento 2 - Update modules without shop throwing exception

I upgraded my modules by calling composer update, then my shop was going offline with the message: Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. ...
0
votes
1answer
10 views

“Unique constraint violation found” in frontend, but no trace in expection.log

I am pretty new to Magento and made a copy of my a production webshop for testing purposes on our server. The website looks to be working fine, but somehow I keep getting "Unique constraint violation ...
-1
votes
0answers
15 views

Magento 2.3.3 Serialization failure: 1213 Deadlock found when trying to get lock

I encountered this problem. When deleting records only in which status = 'error' from cron_schedule table occur such issue: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to ...
0
votes
0answers
12 views

Magento2 AJAX JS Fetch Display

I have a code by which I add information to a database and display it on the same page where the form is (using AJAX), but after refreshing the page, the data disappears (in the database they are) How ...
0
votes
0answers
19 views

I want to override magento2-base module in magento 2.3

I want to override vendor/magento2-base/pub/errors/processor.php file but didn't find any solution. If anyone knows how it can be possible then let me know.
1
vote
0answers
19 views

Magento2.3.4 - Switching Catalog Price Scope causes SQL error

After switching the Catalog Price Scope from Global to Website and trying to reindex I get the following SQL error. How do I fix it? Design Config Grid index has been rebuilt successfully in 00:00:00 ...
0
votes
1answer
15 views

Difference between INDEX_TYPE_INDEX and INDEX_TYPE_UNIQUE

While adding index, it is not necessary for the column values to be distinct. So, in those case what is the Varien_Db_Adapter_Interface which is used in the ->addIndex() function. Also, what is ...
0
votes
0answers
14 views

How to save checkout custom attribute data into customer_entity table in magento 2.3.3?

I already created a custom field using install schema. Now I want to save custom field data into the customer_entity table. Can anyone help me?
0
votes
2answers
39 views

Magento2.3 - How to set text column table value default is None using declarative schema?

I want to create a custom table using db_schema.xml like that contains column like this: I tried to do it like this: <column name="description" nullable="false" default="null" xsi:type="text"/>...
0
votes
0answers
14 views

MySQL Error Upon Akeneo Connector Import [closed]

I am using Magento version 2.3 with the latest Akeneo Connector version 100.4.0. When I run the "Family" import, I receive the following error upon creating or updating families: SQLSTATE[23000]: ...
0
votes
0answers
12 views

how to TRUNCATE TABLE in Magento Cloud

I am using Magento 2.3.3 on Magento Cloud. For the pre-launch, I need to TRUNCATE 2 TABLES from the database. How do I enter SQL mode to execute SQL scripts to truncate 2 tables in Magento cloud?
0
votes
0answers
17 views

Error: Catalog Product Index Website is empty

I'm facing this issue... Sometimes I need to re-enter the information in the table. Any way to resolve this permanently? Thank you for you help.
0
votes
0answers
21 views

suddenly mysql failed to start [closed]

I have tried it all, but it just failed to start mysql lunix centos 7 cpanel whm If I do restarting mysql server through whm I get: Waiting for “mysql” to restart ………Unrecognized configuration ...
2
votes
1answer
25 views

What PHP class executes the SQL to select models and collections from the database?

When I have a PHP model or collection of a Magento entity (such as a product or customer), what PHP class(es) is in charge of constructing and executing the SQL that selects that model or collection ...
0
votes
2answers
111 views

AJAX IN MAGENTO2.HOW TO ADD information from form IN DATABASE?

I already have a form and controller action, that send data without using ajax.How to do it with AJAX? I would appreciate your help! view/frontend/templates/reviews.phtml <form action="<?...
0
votes
2answers
23 views

What is the success rate to comply Magento 2 split database concept?

Currently, we are trying to do the Magento split database concept to split its catalog, checkout, and order master databases. Magento documentation only speak about the very high level https://...
0
votes
1answer
20 views

Mysql modify column not working [closed]

What I wanna do is to update the field comment_author and change the type from tinytext to varchar(100) For some reason it complains about "Invaild default value for 'comment_date'" Why does it ...
1
vote
2answers
66 views

How to fetch data from a custom table in magento2 and show in home page

I have created a custom module with a custom table, now I need to fetch the data from the table and display in the home page. I achieved it by applying object manager I know it's not the correct ...
0
votes
0answers
22 views

Magento2: Update custom attribute using MySql query

I have two custom attributes:- is_featured_product => Yes/No type start_to_date => Date type Now I want to update the status of the featured product to 0 if current Date > start_to_date using Mysql ...
0
votes
1answer
23 views

Magento 2 addFieldToFilter check for NULL not working

What i am doing ->addFieldToFilter('value', array(['eq' => '', array('isnull' => true)])) What i want in the query - '((value = '' )is NULL)` Can anyone help me on this Thanks.
1
vote
3answers
24 views

Magento2 - How to make custom module for customize maintenance mode?

I want to customize maintenance mode in Magento2. Magento2 error message will be hide and my custom message will be visible. If you know anything related to this then share with me.
0
votes
0answers
11 views

Magento2 Admin Grid first (Base table) table data store foreign Key table data not store

In Database data store 2 table using foreign key First table store data while another second table does not store data. public function __construct( Context $context, CancelFactory ...
0
votes
2answers
26 views

output information from the database magento 2

/Block/Reviews.php <?php namespace Training\Reviews\Block; use Training\Reviews\Model\ResourceModel\Reviews\Collection; use Magento\Framework\View\Element\Template; class Reviews extends \...
1
vote
1answer
29 views

Fatal error: Uncaught Error: Call to undefined method Training\Reviews\Model\ResourceModel\Reviews\Collection::addAttributeToFilter()

I want SELECT COUNT (*) FROM name_table WHERE result LIKE 'likes%' to be executed, and a numeric value is displayed on the page.How do I do it? I'm a beginner. I'll be very grateful for your help! /...
1
vote
2answers
39 views

Fatal error: Uncaught Error: Call to a member function select() on null.Magento2

<?php $connection = $this->getConnection(); $select = $connection->select(); $select = $model->getCollection() ->select() ->count() ->from($this->getDbPrefix() . '...
0
votes
1answer
28 views

Where and how is stored the value of “Use default value” checkboxes in Magento 2 database?

On my Magento 2 website, I have multiple stores. On the product page of each store, description is not shown because it's defined globally and each product has the "Use default value" checkbox ...
0
votes
0answers
18 views

Catalog product index website is empty

From time to time the record of this table is deleted. Catalog product index website is empty Tech details: PHP 7.0.33 Magento v2.1.18 Apache/2.4.25 (Debian) 10.1.41-MariaDB-0+deb9u1 Debian 9.9 ...
0
votes
0answers
24 views

Where in the code does the database SELECT take place?

Where is the code in Magento that performs the SQL SELECT for a model and/or collection? I'm trying to trace through the code, but once Magento starts calling interceptors, object managers, and so on,...
0
votes
3answers
34 views

SQLSTATE[HY000] [2002] No such file or directory in magento 1.9

for no reason in getting this error on There has been an error processing your request SQLSTATE[HY000] [2002] No such file or directory
0
votes
0answers
18 views

Magento2 - How to create a backend module to insert data into a table?

I want a module to insert data into a custom table, created a custom table also created a menu in the admin menu now how can I add details to the table from the admin -> menu -> module name. ...
0
votes
0answers
10 views

How to create/change category and filters relations inside Magento database?

I want to change and remove filters in one category of Magento. My problem is that it's impossible to be done by admin interface because Magento returns an error. Once it is an urgent task, I would ...
1
vote
0answers
22 views

Update product data in magento 2

I am trying to update product data programmatically through scripts. The data gets updated in database but not getting reflected in admin panel. I am using magento 2.3.2 Here is my code $product = $...
0
votes
1answer
19 views

Sql error thats been asked about before - Syntax error or access violation: 1118 Row size too large

Magento 2 When attempting to reindex - the usual error. The limitation is 65535. By others calculations it is number of varchar attributes * 255. However, in my case, the sql create statement for ...
0
votes
0answers
9 views

Whenever I fill up the below form and clicking on Save Item Button Data should go to New Scan Orders/New Health Checkup orders Page

Girish/checkupforms is the model for New Health Checkup Orders Page Girish/forms is the model for New Scan orders Page public function saveAction() { if ($data = $this->getRequest()->...
0
votes
0answers
18 views

Error installing on Windows IIS

getting the followingg error when doing the setup on a windows server running IIS. Any ideas why this could be happening? [
0
votes
0answers
14 views

Magento 2 override database connection

I'd like to be able to override the database connection that M2 is using depending on what user is logged in (think multi tenant system). Can anybody point me that the database connection class / ...
0
votes
0answers
27 views

Slow Query Magento 2.3.0

One of the query is taking 1,197.66ms as per the DB profiler. SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ...
1
vote
3answers
32 views

Anonymizing Magento 2.3 DB with fake data

I have tried to anonymize my Magento 2.3 DB with fake data and tried several tools. They are either too complicated or not working ... Anyone knows of a good tool or way to replace all data with ...
0
votes
0answers
17 views

Magento 1.9.4.3 - Print in foreach the columns titles of a table of database

I recreated this question in this section because this is an operation that I am trying to do from the Magento database. So, in my database table "sales_flat_order" I have created 5 columns which are ...
0
votes
1answer
14 views

How to get the product name by the sku in an inner join

I am trying to do a join from inventory_source_item (sku column) to get a list of product names. i currently have SELECT * FROM `inventory_source_item` order by source_item_id desc limit 61 What ...
0
votes
1answer
13 views

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel

I created one landing page, when customers fill all the details it should display in the custom module grid in magento admin panel, how can i implement, <form action="">, what to put in ...
0
votes
0answers
12 views

Access Magento 2 Database using Getpostman

I am trying to find the resource in order to download Magento2 database using getpostman, I have setup env of GETPOSTMAN Not sure if It's possible somehow to generate Magento2 Database from some ...
0
votes
0answers
10 views

Data scaling in magento 2 like integration nosql to load product data from nosql

How we can integrate nosql with magento to load pages data faster than mysql
0
votes
0answers
15 views

Magento 2: How to allow updating a null value for a column having foreign key constraint?

I have 2 tables A and B A id name B id name a_id FK references A(id) I used the Magento's upgrade script to add both tables, everything was created correctly, however when i tried to setting a_id ...
1
vote
2answers
28 views

QLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.vgroup_testimonial' doesn't exist, query was: DESCRIBE `vgroup_testimonial`

I have installed an extension for testimonial by V Group Inc. after the installation when i tried to add testimonies, the extension was giving me this error SQLSTATE[42S02]: Base table or view not ...
1
vote
2answers
23 views

2.3.3: Moving to an updated version of a website

I need to move from my old version of my site to my new one. I have imported all the orders although I did this manually as the products structures completely changed. I would like to know a reliable ...
0
votes
3answers
38 views

How to use one database for each store or website?

Let's suppose that I will create an e-commerce for a restaurant chain that has several restaurants and in each restaurant the menu is a little different. The user will enter the website and input its ...
0
votes
1answer
26 views

How to assign guest orders to registered customers by email via SQL?

I'm using this SQL below to manually assign guest orders to registered users. UPDATE sales_order SET customer_id = {YOUR CUSTOMER ID}, customer_is_guest = 0 where entity_id = {YOUR ORDER ID}; UPDATE ...
0
votes
0answers
7 views

how can i move the product tab section to the below of the product gallery with 50% width in magento 2

how can i move the product tab section to the left of the gallery section with the width 50% which is now having 100% width in magento 2.3.3 please help
2
votes
2answers
140 views

Magento 2: How to dump database from Magento cloud

How to dump the database to local system from Magento Cloud server with Magento 2 Commerce. I have only access to the ssh but that ssh user doesn't have write permission into the server. So by any how ...

1 2 3 4 5 66