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

Magento 2 Catalog search results are not correct?

I have migrated data from magento 1 to magento 2. I am searching product name: 4.0ct Round Morganite Diamond Engagement Ring Bridal Set 14k White Gold then it is showing lots of products on result ...
1
vote
0answers
27 views

Magento 2.3.2 : How to clear magento database after testing

I am currently doing a lot of tests in Magento so I can get familiar with it. Unfortunately the database is extremely cluttered with my tests. I wish to clear up the database so I can start over again....
0
votes
0answers
17 views

Magento 2.3.1 Frontend stock not correct after sql update

I'm updating stock via SQL update along the lines of below website https://www.danjoseph.me/2017/01/12/magento-2-database-level-inventory-management/ The price and qty is updated and visible in ...
0
votes
1answer
21 views

Magento 1 sub domain Redirect issue

Just copy original domain files and DATABASE to Sub-domain and change Base-URL every links is working prefect but only few products, category, and images slide show links redirect to original main ...
1
vote
1answer
41 views

Magento 1.9 Mysql Query to pull out data

I am kind of stuck getting data from magento 1.9. The solution i needed is mysql query so that I can collect all data in one table. The values in table i needed from different table are product id, ...
0
votes
0answers
17 views

Using Magento 2.3.2 with MySQL 8.0: Which problems could arise?

According to the DevDocs only MySQL 5.6 and 5.7 is supported. I have set up a shop now with MySQL 8.0 and it seems to work so far. However, it is not a fresh installation, instead I dumped the ...
1
vote
1answer
42 views

Bulk updating product prices : Magento 2

In my M2 store I have over 200k products. They were added manually through API (https://domain.com/rest/all/V1/products call). Nowadays prices of my products are changing frequently and I need to ...
0
votes
1answer
63 views

Magento 2.3: Delete Product Attribute SET and Delete all categories through Database Query

I want to delete all custom attribute sets, I'm facing an issue when I'm deleting attribute set manually then 404 error is showing in Magento 2.3 and can i delete all categories with 1 database query ...
0
votes
0answers
25 views

Magento 2 : Create a module for hiding custom options of a product when checked using checkbox

To create a module for magento that adds a checkbox for the values rows in the “Customizable Options” section on the product page in magento backend. This checkbox will hide the customizable option ...
0
votes
0answers
29 views

Magento 2.3 - Restore deleted categories

Accidentally I delete a few categories from my Magento 2.3 store. I have an old database backup that contains these deleted categories. Is there any way to import just categories and product ...
0
votes
0answers
15 views

Database Resources setup in local.xml + magento1.9

I want to setup default_setup and default_read as different databases for both in Magento 1.9. Now the thing is there is something wrong with default_setup DB but default_read DB is proper so homepage ...
1
vote
1answer
31 views

Magento 2.2.2 to Magento 2.3.2 - setup:upgrade error

After being able to update magento to 2.3.2 Which is in current state when I try to run the command bin/magento setup:upgrade: get the below error root@---:/var/www/html# bin/magento setup:upgrade ...
0
votes
2answers
38 views

Magento 2.3: get latest post from table

I have a simple post table, how can I get lasted post in the phtml file.
0
votes
0answers
27 views

Products with tier prices cannot be updated

I run magento 2.3.0 and have the following problem. I have several configurable products in magento store. Under the configurable products i have created simple products with tier prices. When i ...
1
vote
1answer
30 views

Magento 2 load dynamic values to select field in XML

i am new in Magento development. I am trying to create a new module for adding dynamic fields for product edit page. Now I was able to add the fields in admin's product edit page. now I want to show ...
0
votes
0answers
11 views

How to restore images of deleted products via sql?

I am using magento 2.2 version , I was deleting few products from admin dashboard , at the time of deleting my site crashed due to server issue and because of that when site goes up I see that 8 ...
0
votes
1answer
21 views

Auto Cron is Not Working When I want to add Data into DataBase

Here Data Was Successfully Addded Into Database When i Run php bin\magento cron:run Command But AutoMatically Data Wasn't Added. vendor\module_name\Cron\Test.php use Psr\Log\LoggerInterface; class ...
0
votes
1answer
47 views

InstallSchema not running even though module is not installed

I searched all over and don't see anyone with the same issue. Below are steps I tried to solve this with no success I deleted the module from setup_module table. I don't see any errors in var/log/...
0
votes
0answers
18 views

EAV load collection issue (High Load Time)

We have an eCommerce platform. The issue is that when we increased the products to ~3000, the EAV:load_collection is taking a lot of time(~20 sec) and eventually slowing the site. If I remove the ...
0
votes
0answers
23 views

DB Error SQLSTATE[42S02]

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mavikmarine_l2li.m_catalog_product_flat_1_tmp_indexer' doesn't exist, query was: UPDATE m_catalog_product_flat_1_tmp_indexer AS et ...
1
vote
2answers
34 views

Magento 2: SQL get orders with specific option id

I'm trying to get all orders with a specific option id to see what percentage of orders are ordered with measurement of centimeters. Not very good with database queries and I can't seem to figure it ...
0
votes
0answers
12 views

Slow Query magento 2 Product page

I am debugging magento 2.3.1 before releasing it to production and I find that some products respond slowly and others make it faster. (then I will update it to 2.3.2) In particular I have a query ...
0
votes
2answers
53 views

Error Array to string conversion in vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3101

When i tried to edit an image in custom module i am getting an error like below. 1 exception(s): Exception #0 (Exception): Notice: Array to string conversion in /var/www/html/vendor/magento/...
0
votes
2answers
46 views

Magento 2 - How to truncate table using SSH?

I want to truncate database tables using command line. Any directions will be highly appreciated.
0
votes
2answers
33 views

How to truncate database table using n98-magerun2?

I am trying to truncate the database table using n98-magerun2 version 3.2.0 and having some difficulties. I know there is a command with option to run an SQL query: db:query Executes an SQL query ...
0
votes
0answers
28 views

Magento 2 custom catalog condition rule not saving in custom module

I have added custom catalog conditions to my custom module admin form. a condition drop-down is displayed fine and in post data, condition value is also getting. but I am unable to save condition ...
0
votes
1answer
27 views

What is the “static” backend type in EAV attribute Magento 2?

In the "eav_attribute" table I discovered that some attributes have the backend type set to "static". Example, attribute_code = 'telephone' & entity_type_id = 2 resulted in a "static" backend ...
0
votes
0answers
25 views

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.attribute_set_id'

I am trying to Filter the products based on vendorid with attribute_set_id. if i use print_r in the collection i am getting the result like below $objectManager = \Magento\Framework\App\...
0
votes
0answers
26 views

What is correct way to create an admin form that doesn't save to database?

My goal is to create an admin page that allows site administrators those with specific roles to change a password on behalf of a customer. At the moment I seem to be having issues creating a page in ...
2
votes
3answers
40 views

M2 - Change end date of all coupon codes

In the database there is a table called salesrule_coupon which has all the coupon codes in it. I need to change the column expiration_date for all the coupons to the same date 30-08-2024, Is This ...
0
votes
1answer
25 views

Magento 2 - Orders saving as local timzezone

I have an issue with how a Magento 2 store is saving orders. My understanding was that orders are saved in UTC. However, when new orders are placed, it is saving them as our local timezone in the ...
0
votes
2answers
43 views

table missing after upgrade to 2.3

I upgraded to Magento 2.3 and got this error on the top of the admin page. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'a15809b3_m2.magento_bulk' doesn't exist, query was: SELECT ...
0
votes
0answers
9 views

Magento 2 - I have removed duplicated tables from database and part of home page is not showing

Magento 2.2.7 In DB I have found that I have a duplicated database. My database tables have prefix dev_ while there were identical tables without prefix that was probably left after some "test" ...
0
votes
2answers
30 views

Magento 2 - Create a log file in plugin that will print log when data is inserted in database

I have entered data in the database using object Manager in Model file itself. I want to print a log file from the plugin that will print the log of the last data that is inserted in the database.
0
votes
0answers
7 views

Magento 2 - add stored procedure via installer

There are lots of articles about how to add stored procedures / triggers in Magneto 1, but what is the best practice to do this in Magento 2?
0
votes
0answers
18 views

Issue with flat catalog table product collection in Magento 1.9

I am facing an issue regarding magento product collection as I have some additional product attribute and use general way to get product collection like: Mage::getModel('catalog/product')->...
0
votes
0answers
22 views

Magento 2 - Problem inserting Data in the Database using objectManager

I want to insert data in the table directly using object Manager from Model file. I am providing the code snippet but this isn't inserting the data. I want to know the correct syntax to perform the ...
0
votes
0answers
24 views

Mysql query INSERT INTO “search_tmp…” never ends after mass attribute update in Magento 2.3.0 Causes Server overload and site down

MySQL query INSERT INTO “search_tmp…” never ends after mass attribute update in Magento 2.3.0 Causes Server overload and site down my mysql found this query very sluggish and slow, which is as ...
1
vote
1answer
31 views

Magento 2: Order Increment Id not working

In our website, magento order increment id is not working as expected. We are getting difference of 3 between every two orders. Like for example,we have order 000005167 and next order we are getting ...
0
votes
2answers
26 views

product view count table in database magento 2?

I have to write code for getting product count.it is working fine but i want to know where the count record comes? public function getProductCount($id) { $prodData = $this->_prodCollection-&...
1
vote
2answers
38 views

How to output and filter collection using “->where” filter?

I trying to get output from collection using 'where' filter but no result. This is my code: $collection = Mage::getModel('my_work/datanews') ->getCollection() ->...
0
votes
1answer
27 views

can't edit product in magento 2. redirect to 504 connection error

In magneto 2, after editing product its shows please wait loader and redirect to 504 connection timeout error.
0
votes
2answers
38 views

SQL error when run command line upgrade Magento 2

When I run the following commmand: php bin/magento s:up; It throws the following error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_magen34.mg7a_sm_products_filter' doesn't ...
0
votes
1answer
22 views

all product page showing 404 and i could not access admin pages magento 2

I have copied my Magento 2 backup to my new server now I am getting all product page showing 404 and I could not access admin pages magento 2 exception.log main.CRITICAL: Unique constraint ...
1
vote
1answer
31 views

InstallSchema.php fails to execute

I've read various posts here but none of them have been helpful. Steps I have taken: Remove My_Module from setup_module in DB Add Setup/InstallSchema.php Clear generated/* directory Clear cache ...
0
votes
1answer
43 views

Error reindex catalog_product_attribute magento 2

After running reindex catalog_product_attribute, I get an error - (General error: 1114 The table 'catalog_product_index_eav_temp' is full, query was: INSERT IGNORE INTO catalog_product_index_eav_temp ...
1
vote
2answers
199 views

In magento 2, how to edit the uploaded image field

In magento 2, how to edit the uploaded image field I follow this blog https://blog.qaisarsatti.com/magento_2/magento-2-ui-component-image-upload/ ui-component <field name="promo_image"> ...
1
vote
1answer
19 views

How can I fetch value from serialize product_options faster

I am using following query to load data SELECT `main_table`.*, `sales_order_item`.`product_options` FROM `magento_giftcardaccount` AS `main_table` LEFT JOIN `sales_order_item` ON sales_order_item....
0
votes
0answers
19 views

Magento 2: tmp_catalog_category_entity__sales_order_1 doesn't exist

While running php bin/magento s:up We get the following error: SQLSTATE[42S02]: Base table or view not found: 1146 Table '[DATABASENAME].[PREFIX]tmp_catalog_category_entity__sales_order_1' doesn't ...
1
vote
1answer
26 views

Magento 2 Can't Convert Data Convert From quote_item to order_item Table Using Field-set

Can Anyone Please Help me to data convert quote_item to order_item Table Using Field-set. First I am Create file etc/extension_attributes.xml and use code <?xml version="1.0"?> <config ...