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
6
votes
3answers
135 views

How to keep products synchronized in two shops

How can I transfer all products from one shop to another after clicking a button? We have a shop which is a copy of our real shop. We need to keep the products, prices, etc. synchronized in both ...
0
votes
1answer
36 views

How to Get Recently viewed Products in Magento 2

i want to get all data from magento core table table name is report_viewed_product_index i searched on stakeexchange and found some solution but havn't for success class Wbtab extends \Magento\...
0
votes
0answers
21 views

magecatalogrule database tables automatic copies

I have a Magento/2.2 (Community) which is creating every about 30 minutes a copy of magecatalogrule_* database tables. In the last hour: 09:36 magecatalogrule_group_websitebda17fbb 09:36 ...
1
vote
1answer
136 views

row_id vs entity_id in magento 2.3 EE

in magneto 2.3 EE , entity_id is missing in EAV tables , instead row_id is available please explain the difference between row_id and entity_id and the removal of enity_id in EAV tables
0
votes
0answers
197 views

Magento2 Database Lock wait timeout exceeded

In my magento admin panel i am getting below error. SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE flag SET state = ?, last_update = '...
1
vote
0answers
29 views

How to add custom field in checkout page and save them in db and backend in magento2.2.5?

I want to add a custom field in the checkout "Birthday" and "Anniversary" and save them in table quote, sales_order, and sales_order_address and to save them in Backend in sales view order below the ...
3
votes
0answers
68 views

Setting up AWS RDS Read Replica on Magento

My Magento DB hosted on AWS MySQL RDS is running at 100% utilization. I have created a Read Replica so that read query can be served by it. But do not know how to configure it. Does anyone have any ...
2
votes
1answer
36 views

How to join three custom table in magento 2

I want join from Table 1 -> Table 2 has id = custom_id Then join from Table 2 -> Table 3 has Table2.id = Table3.id And will get table1.id if eligible My Table Ex : Table 1 -> Table 2 Table1.id =...
0
votes
1answer
40 views

phpcs possible raw SQL statement

In my code I've got a $connection->query("TRUNCATE TABLE $tableName"); Works great. However using the official https://github.com/magento/magento-coding-standard ruleset it showed the following ...
1
vote
0answers
60 views

Magento 2.x Migration Final Sync 'Delta' Stage when not Migrating from Live Database

In the middle of a Magento 1.6.2 to Magento 2.x migration. I made a duplicate of the 1.6 store/database and migrated the data from that database to the new one. That was probably about 2 weeks ago ...
0
votes
0answers
15 views

Magento1 frontpage keeps loading, but admin panel is working fine

Magento version 1.9.1.0 is installed on the server. When I open the admin panel, site is working fine. But when I open the home page or any category page site keeps loading. It does not throw any ...
0
votes
0answers
29 views

Magento 1.9 running slow on frontend on localhost and production servers

I'm trying to speed up Magento 1.9.0.1. It's taking something like a minute or so on localhost MAMP 5, and page speeds on production are loading over 10 seconds. I've tried full page cache extensions,...
0
votes
1answer
30 views

Magento Shipping country ID is shown as NULL in the reports

I'm using PostgreSQL in my data ware house for reporting purposes, and for a certain report I have to show the sum of revenue for each month grouped by country. When i pulled the report the ...
0
votes
0answers
26 views

How to display numbers of row in table to section in configuration system

I want to count the rows of table and display it to field in section system, can someone help me how to resolve this. Thanks!
2
votes
3answers
215 views

How can I remove not existing images in magento 2

How can I remove not existing images from magento. In the database have images but file is not exist. I want deleted this images from database.
0
votes
1answer
38 views

How to add magento 2 location based search product

Like this how to do in magento 2 location based product search
0
votes
0answers
11 views

Magento2.2.5 I am getting Integrity constraint error while placing order?

{"0":"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (mm_29.order_custom_engravings, CONSTRAINT ...
0
votes
0answers
46 views

order sale vs purchase order in Magento (not getting the difference)

I dont fully understand what is the difference between Sale Order and Purchase Order in MAGENTO. In my system i have 4 tables that are related to the Sale Order and 4 tables that are related to the ...
1
vote
3answers
252 views

In Magento2, how to get the product description from Sales order table

I want to display the order id, item description, sku and price of products from the sales order and sales order item tables. For some reason, the description columns in my sales order item table is ...
1
vote
1answer
29 views

How to set varchar on installschemas

I would like to add a new column inside the magento2 database. Write now i add a \Magento\Framework\DB\Ddl\Table::TYPE_TEXT as the column type. here is my code if(!$installer->getConnection()-&...
3
votes
2answers
161 views

{“0”:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name'

Any Help Highly Admired, i'm using Magento 2.2.8 did all commands,upgrade, reindex, static file , etc still not worked {"0":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name' in '...
0
votes
1answer
40 views

What MySQL Collation should I use for Magento 2.2?

Looked for a Magento 2 version of this question but only found a Magento 1. There's 4 that come to mind: utf8mb4_general_ci utf8_general_ci utf8mb4_unicode_ci utf8_unicode_ci Which one should I ...
0
votes
1answer
29 views

Product Filter By Date Attributes Magento 1.9

So i have created a attributes is future_date Now i want to filter product based on this attribute. I want to filter product whatever match with this date. For an example we setup a date 5th June and ...
1
vote
1answer
30 views

Magento 2 Custom table collection Conditions

I'm facing an issue with the dynamic parameters for the filter $collection = $this->_collectionFactory->create()->addFieldToSelect('field_name'); If I have below code it works fine if the ...
2
votes
3answers
108 views

Magento2: Insert and update operation in custom module Admin-side(through Admin panel)

I have create a database-table. I displayed(grid view with toolbar) the table-records in Admin-pannel. Now I need to know the Insert,Updata and Delete process through admin-side process.Please Give ...
0
votes
0answers
42 views

Unique constraint violation found

when edition the product for the backend, I faced the unique constraint violation found in the Magento-2.3 . I have checked the exception log this shows SQLSTATE[23000]: Integrity constraint ...
1
vote
1answer
27 views

Update sales order immediately after inserted

I want to update the sales order right after it is inserted. I want to reflect the change on the sales order conformation email also which is going to the customer. So i have prepared the below code ...
1
vote
0answers
45 views

Magento2 change Category-Product position to string

I would like to change the category-product position to be a string. Because I have an exploded view for spare parts and they are numbered with strings (1a, 1c, 605,...). The customer should see the ...
0
votes
1answer
24 views

Magento 2 - Location path of the SQL query file which inserts orders in to database

I want to modify the values of the product items will be inserted to table 'sales_order_item' right before the order is placed. So im trying to locate where the exact query is. Also the order ...
0
votes
0answers
25 views

magento atrributes values not showing on admin and frontend

I have upgraded magento version from 2.1.8 EE to magento 2.3.1, after upgrade some attributes values are not showing in admin and frontend, like full short description is showing blank in admin and so ...
4
votes
1answer
49 views

Magento 2: Insert and select operation (without model) in custom module

Please give me any example or link for insert and select process without using model in custom module of Magento 2.
0
votes
2answers
71 views

Improving Performance

We run a Magento 1.9 online store. It contains 110,000 products. We are running into issue around long page load times for category pages and product pages. Dedicated WebApp server specs: - Apache 2....
1
vote
2answers
120 views

How to check if column exist before trying to add it to the table?

We are using the Extension FollowUp E-Mail from AheadWorks. The Extension has bugs in the sql install scripts... they are trying to add a column to a table but don't check if the column does already ...
0
votes
0answers
14 views

Magento 2 connection reset error when processing large datas

I am using Magento 2.3 in ubuntu 16.4 with apache server. I am syncing data from Dropbox csv into Magento 2 attributes. Everything working fine, but I have more than 17,000 SKU's and need to process ...
1
vote
0answers
20 views

Magento 2.x - Save same model data in multiple databases

I have a very big B2B eCommerce which is based on websites (each website has different products, customers etc). For each website I need to have different databases. I have achieved such a thing but ...
0
votes
0answers
29 views

Copying a Magento 2 Site to New Domain 'Remembers' Old Site

I have copied a Magento 2 site from a test domain (testing.mytest.co.uk) to a live domain (mylive.co.uk). It has come time to upgrade the Magento version (2.2.5 to 2.2.6) and I receive the following ...
0
votes
3answers
82 views

custom table left join with catalog/product

I have a custom table called flagged_products which lists flagged products like this: +-----------+------------+---------------------+ | entity_id | product_id | flagged_on | +-----------+---...
2
votes
2answers
43 views

Database connection error, after CLI install?

First time Magento user here, seeking enlightenment. I did a CLI install on CentOS 7 using the following command... ./bin/magento setup:install --base-url="http://example.com/shop/" --db-host="127....
2
votes
1answer
51 views

How to Insert record in database-table through custom module in magento2

I have create a custom module and database-table using following this steps and i understand the table displaying in customer_side. Now I Need to Know the Insert operation in customer_side please ...
0
votes
1answer
117 views

Magento 2.3 - How add new column/field to sales_shipment table

I need to add a new column/field (total_volume) to sales_shipment table. I know that I can use two approaches to do this, but what is the best? The first approach is to use the "Extension Attributes"....
0
votes
0answers
58 views

Magento 2 Undefined offset during migration

I'm getting next error during migrate:data Notice: Undefined offset: 1 in /var/www/magento/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 455 $...
0
votes
1answer
20 views

magneto2 installation settings - mysql database password problem

I am trying to run the magento 2 install (default shown below). However, if I add a symbol into the password it complains and says Your password must include both numeric and alphabetic characters. ...
0
votes
0answers
61 views

M2 | How can we use same code base among all team members via Git?

We are a team of developers and wanted to share same codebase (DB, Configuration, Magento instance). We are using Magento 2 Image for Docker on MacOS. Individually we are working fine with docker. ...
1
vote
2answers
71 views

How can i submit my form data in custom table magento2

my custom_tab1.phtml my custom form is here please help me how to submit form data in custom table in magento2.3 without using objectmanager
1
vote
0answers
25 views

How can I change multiple entries in DB?

In DB I have Rows: ID NAME PHONE Example: 1 Steave 33333333 2 Joe 77777 I can add and Edit any row, but I want when I click "save everyone" I rewrote all phones on DB example: 1 Steave 33333333 ...
0
votes
1answer
130 views

Insert, Update values in existing custom table and Select values from that table. Magento2

How can i Insert, Update values in existing custom table and Select values with Magento methods not sql requests ?
1
vote
1answer
29 views

Find duplicates in many columns query builder [closed]

I have this code to find duplicates, but i compare All columns in same row, also it returns only one row $groupBy = explode(',',$request['fields']); $duplicates = DB::table($module) ->...
1
vote
1answer
141 views

Magento 2.3 introduced a view table which causes issue with import of mysql dump. What's it for?

If you mysql dump a magento 2.3 store and try to import it elsewhere you get an issue due the the format of the view import query. The problem part is this: CREATE ALGORITHM=UNDEFINED DEFINER=`...
0
votes
0answers
73 views

Magento 2.3: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)

I'm very new to magento 2.3, I'm facing some error maybe from DB side.... Here is my code: /app/code/EC/Customimport/Controller/Adminhtml/Index/Import.php <?php namespace EC\Customimport\...
1
vote
1answer
52 views

Upgrade 2.2.6 - 2.3.1 -> Table staging.queu doe not exist

I have followed all procedures to update correctly. After composer is updated and we run 'php bin/magento setup:upgrade' we get a strange error. Please see image attached. Error is Base Table or view ...