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

Magento 2 Error: Base table or view not found: 1146 Table 'dbname.table_name' doesn't exist, while database import

I have a fresh setup of Magento ce 2.3.2, while importing the database with sample data in fresh database and I faced this error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not ...
0
votes
0answers
30 views

Add a column in admin review page

The above picture shows the review managed by admin. I need to add a new column near action which should have the reply of the admin. What should I do to make the new column for the admin and to ...
0
votes
0answers
16 views

Need to get multiple column details through API

I wanted to get position and department of given email id. I am able to get one of them. What is the way to get it both. Service class:- public function getInfo($email) { $CustomerModel = $this->...
1
vote
0answers
14 views

Magento chage price - phpMyAdmin

I change my price using this code: update`catalog_product_index_price` set price = price + price*0.15; He change, but after 10-30 miuntes he return me the old pices
2
votes
2answers
43 views

Not able to get data through API…!

Error is "message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5dee36e254394". When you run http://localhost:8888/magento/rest/V1/position/1 Need to get result ...
1
vote
0answers
41 views

Magento 2 How to get simple product name of a configurable product in sales_order_item table

Using the SKU as a guide (sales_order_item.sku), how can I get the simple product name of the configurable product? This code gets the configurable product name (should be simple) public function ...
0
votes
2answers
47 views

Adding data to database from custom form

I'm able to fetch data from custom form but not able to put it in database table. Here I post details of model and controller SimpleMagento\Custom\Model\Name.php class Name extends \Magento\...
1
vote
0answers
41 views

Adding data to database [closed]

I'm able to fetch data from custom form but not able to put it in database table. $model = $this->_name->create(); $entity = $this->getRequest()->getParams(); $model->...
1
vote
2answers
25 views

Undefined property: SimpleMagento\\Custom\\Controller\\Test\\First\\Interceptor::$getRequest … In controller

Error in controller :- Undefined property: SimpleMagento\Custom\Controller\Test\First\Interceptor::$getRequest .......While fetching data from custom form. Can someone provide me solution or how to ...
1
vote
1answer
27 views

Magento:2.2.8 Save response in db under custom_column created in sales_order and quote tables

I am using Custom Shipping API where I am getting response from API. Here I want to save this response to my order and quote table, I used event checkout_onepage_controller_success_action Here's code ...
1
vote
0answers
54 views

Magento2.3.3 Facing Error during Data migration

I am trying to migartion from Magneto1.9.3.10 to Magento2.3.3 but I am facing error during [Eav Step] data migration like: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does ...
1
vote
0answers
14 views

Magento 2 Custom Table Auto Increament Column value disorder

In my custom module, I have a database table with auto increment col. The columns values initially work fine but when I delete any record the value increased like this order 1,2,3,4,5,6,10,11,110,115,...
0
votes
1answer
24 views

Magento2: How to check record before save record in table?

I am adding the barcode with product SKU and product ID in a table using below code:- File Path: /app/code/[NameSpace]/[ModuleName]/Model/ResourceModel/Custom.php public function generateBarcodes($...
0
votes
0answers
13 views

Save prices with 2 decimals only in database

We have a problem with synchronizing invoices with an accounting software. The product price sent from the synchronization magento module (to the software) is rounded by 4 decimals. In the software ...
1
vote
0answers
12 views

cron_schedule table not emptying itself (deadlock error)

I just realized after cheking my logs that all the queries supposed to clean my cron_schedule table are not being executed properly. My table just keeps on growing. Here are the three exception types ...
1
vote
0answers
46 views

Magento Commerce Cloud : Tool for real time monitoring of sql queries and processes

I need to monitor the number of SQL queries and processes and their corresponding CPU and swap usages in real-time just like the monitoring tool provided with PHPMyAdmin. I need something similar for ...
1
vote
0answers
18 views

Checkout Totals Sort order not changing

When I attempt to change the checkout totals sort order in Magento 2 backend, I can press save, however the sort order doesn't seem changed from the magento 2 backend. When I look in the database, ...
1
vote
1answer
182 views

Magento 2.3 data insert using Data patch

I have created a new table and added a few data using Data patch setup/patch/data/. Now I want to add some more data and want to update few data's so can anyone please help me or guide me that how ...
1
vote
0answers
43 views

Magento 2.3 - Add a new column after one column into the table using db schema

I need to add a new column after one of the particular columns in the existing table using DB schema & checked this dev doc link, they didn't mention about the before or after column. Is there ...
1
vote
1answer
25 views

How set data in table “quote_address”

How to set data in table quote_address after placing an order? ty for answer
1
vote
0answers
79 views

Magento 2 - If search using less than min query length then it gives me error

If search less than min query length it gives me error on the front website in magento2. In catalog search, I have set min query length to 3. And if I search with 2 char length then it giving me an ...
0
votes
0answers
83 views

Issue Google Shopping Index Magento 2.3.3

Trying to setup Google Merchant from Magento version 2.3.3 Now when done and I run: php bin/magento indexer:reindex scconnector_google_feed I get an error: Column not found: 1054 Unknown column '...
0
votes
0answers
23 views

SQL update special price products

I have a strange problem with my special price query update. When I run the query, the special price is updated in the database. But when I reindex and clean the cache, the special price in the ...
2
votes
4answers
184 views

Can't import database Magento 2.3.3

I have created a backup database by command line: php bin/magento setup:backup --db Then I import it to my new PHPMyAdmin, But it shows a bug: Static analysis: 4 errors were found during ...
0
votes
0answers
20 views

magento 1.9 | process starts mysql on its own

My site automatically turns on mysql process, which loads the database and CPU sometimes to 120% and some other processes are also running, but I can’t understand what it. because of this, the site ...
0
votes
1answer
39 views

Issue with Customer Order Collection Magento 2

I have a problem with the default Magento core function. I really don't know whether it is a conflict with any other modules. When we go to the customer menu in admin and select any customer from ...
0
votes
1answer
26 views

Magento 2.2 : Upgrade customer_eav_attribute table 2.1 to 2.2

After updating Magento 2.1 to Magento 2.2 I get the following error when saving a client. I have seen that in the customer_eav_attribute table the data has not been updated correctly to the new ...
0
votes
1answer
25 views

magento error after instal

after install magento I have error: An error has happened during application run. See exception log for details. in exception: main.CRITICAL: SQLSTATE[42S02]: Base table or view not found: 1146 ...
0
votes
0answers
16 views

Table media_storage_file_storage doesn't exist

Ever since upgrading to Magento EE 2.3 from EE 2.1, I see lots of exceptions reported for Table 'magento.media_storage_file_storage' doesn't exist Nothing appears to be broken, but I'm not sure ...
0
votes
0answers
15 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
27 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
108 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
50 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 ...
1
vote
0answers
158 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. In this case i have about 30 domains in 1 multidomain ...
0
votes
1answer
71 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
12 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
97 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
8 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
36 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
18 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
38 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
31 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
39 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
46 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 ...
3
votes
0answers
40 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
207 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
36 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
190 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
29 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
78 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, ...

1 2 3 4 5 66