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

insert custom option from sql query

I want to insert custom options for a product via sql query. I tried with these queries: INSERT INTO catalog_product_option ( sku, product_id, image_size_x, file_extension, option_id, image_size_y, ...
0
votes
2answers
41 views

magento2 - Data migration: missing configurable attributes after migration from 1.9.4.2

After completing a data-migration trying to exclude the import of products I can no longer complete the saving of a configurable product and the following window is shown I have a dump of the db ...
1
vote
2answers
42 views

Magento 2.3 InstallSchema.php does not create any table

I have an InstallSchema.php that does not create the table in the database. Here is the code of the schema php: <?php namespace MyVendor\News\Setup; use Magento\Framework\Setup\...
0
votes
0answers
23 views

Database Unnecessary log Table - Magento2

To keep the DB optimized and clean, do we need to set up a cron to truncate the following tables? customer_log; customer_visitor; report_compared_product_index; report_event; report_event_types; ...
0
votes
0answers
25 views

Magento2.3 - I want to display dropdown in page main action on admin panel

How to add custom dropdown here in my custom module.
0
votes
0answers
16 views

Magento- mySQL Data Dictionary initialization failed

I just installed Magento, and it cannot run the DB server.Im currently on Ubuntu 17.10. To reproduce the error I only need to run the mySQL DB Server, and it outputs the following log file: 2020-02-...
0
votes
1answer
30 views

Is there 404 hits list in database?

I was wondering does magento store somewhere 404 requests by default?
0
votes
0answers
26 views

How do we add Extra Cities MRI , CT and PET CT Scans Information in In Home What We Do Tab of Technopro Settings of Magento 1.9 [closed]

In Technopro Settings I want to add and see Store View Information of all the Cities.
0
votes
1answer
26 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
12 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
17 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 ...
0
votes
0answers
13 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
20 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
20 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
17 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
44 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
13 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.
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
114 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
24 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
68 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
24 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
25 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
13 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
45 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
37 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
19 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
23 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
28 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
40 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
14 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 2 3 4 5 66