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

Magento 1.9.2.2 - CCSaved - Button to delete credit card information

I'm running Magento 1.9.2.2 and collect Credit Cards offline. Needless to say, I do not want to keep the credit card information indefinitely on the database. After the order ships, I would like to ...
1
vote
0answers
22 views

Magento 2 Enterprise Edition - Need to run app:config:import every time in centralized database

I am working in centralized database in Magento 2 Enterprise Edition, Every time someone changes anything (even from admin configuration) I need to run app:config:import everytime if anythings ...
1
vote
1answer
110 views

Need help with ui component and change sorting order of columns in magento 2

Have listing but need to change view of one column: <column name="status"> <settings> <filter>text</filter> <label translate="true">...
1
vote
2answers
47 views

How to write Nested Query in Grid Collection _initSelect method

I want to Apply this Query using $this->getSelect() method SELECT * FROM (SELECT * FROM customer_grid_flat ORDER BY enroller_id, entity_id) customer_grid_flat, (SELECT @pv := '$id') ...
0
votes
2answers
18 views

when the searched product does not exist in database then how to show that searched product?

In the search engine i have searched one product.that product not in the database but product is moving to add to cart page and store in the database and it will show the message not in stock but in ...
0
votes
1answer
68 views

Magento 2.3.1 Base table or view not found

Magento 2.3.1 keep filling logs with these errors: system.log [2019-05-04 23:30:12] report.INFO: SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`...
2
votes
0answers
18 views

Custom feed get only hidden image Magento 2.3.1

I am working on a module which creates an xml feed for a price comparison engine. I need in there to pull only the hidden image of the products that exist in the xml. All products have one hidden ...
0
votes
0answers
10 views

How to apply Foreign key to customer EAV in magento 2?

I have inserted the eav attribute using InstallData.php for customers like this, it's working fine but now i need to connect this attribute to school table in the database using foreign key. Can i ...
0
votes
1answer
12 views

EntityManager is trying to insert an existing row instead of updating the row

I have an extension property on Magento's Invoice class, and I'm trying to make an API method that sets the value of my extension attribute for a specific invoice. I'm using my class as an extension ...
2
votes
1answer
34 views

Unable to access the PUT API service of Magento 2 through Python

I'm trying to update a particular product in Magento through PUT using python. I'm using OAuth1Service for authentication to Magento 2. GET products is actually giving me all the products in Magento ...
1
vote
2answers
242 views

When updating to Magento 2.3.1 db_schema.xml is invalid: Element 'schema': No matching global declaration available for the validation root

While updating Magento 2.2.8 to 2.3.1 I'm facing issue when running bin/magento setup:upgrade I get error: The XML in file "/var/www/html/vendor/magento/module-store/etc/db_schema.xml" is invalid:...
0
votes
0answers
55 views

Category page not working Magento 2 with more than 13 million products

I am stuck in an issue with Magento 2 has more than 13 million products. We have managed to upload 13 million products although is slow and it works like indexing, product page, and search page. My ...
0
votes
0answers
70 views

SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL doesn't yet support Magento 2

I am facing below error while run setup upgrade commands. SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL doesn't yet support 'multiple triggers with the same action ...
0
votes
0answers
47 views

Magento2: Cardinality violation: 1241 Operand should contain 1 column(s)

When i delete the item from cart then got the SQLError below: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s), query was: SELECT `catalog_category_entity`.* FROM `...
1
vote
1answer
87 views

Magento 2 : Delete all Catalog Price Rules Programmatically

I know we have Delete Rule option when we edit any Catalog Price Rule. But I need to delete all Calalog Price Rules programmatically because there is no option to delete all rules. Solutions may be : ...
1
vote
1answer
55 views

echo my sql query in magento

here is some minor question but it always bother me while doing the code with magento. $resource = Mage::getSingleton('core/resource'); $write = $resource->getConnection('core_write'); $table = $...
0
votes
1answer
40 views

SQL STATE Error while setup:upgrade in magento 2.3

Getting this error when adding the new module, i don't have this table in database but i am getting this error, anyone can help?
0
votes
0answers
25 views

Magento 2 : Error when importing customers

When trying to import Customers from the backend, Data validation is OK but when I click on import button, the page gets stuck on please wait for loader and I get the error : See the logs below ...
0
votes
0answers
25 views

Magento 2 data not fetching from table for special content

I am developing a custom module where I create a column in database and saving the below content data <?xml version="1.0"?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> ...
1
vote
1answer
21 views

Multiple Database Records with Same Primary Key

I need to store relationships where a single attribute_id may be visible in multiple store_id and I was trying to use attribute_id as the primary key. It would be something like this: +--------------+...
0
votes
0answers
20 views

Add Customer Attributes through Admin Form

I'm trying to build a extension where I can dynamically add new Customer Attributes just like I would do with Product Attributes. The thing is that I'm new to Admin Grid and I'm not finding the a few ...
0
votes
2answers
80 views

how to update data in database table

I am sending data to the database by checking duplicate data. But I can't be inserting/updating data in the database. protected function saveEntityFinish(array $entityData, $table) { $...
0
votes
0answers
37 views

What is best way to move database from Magento 2 to Magento 1

I wanna move product category order from Magento 2 to Magento 1. what is the best way for this? I create export from product and import to Magento 1 by default tools on manage but I get some error ...
1
vote
0answers
27 views

Insert order data from csv programatically in Magento 2.2

I have 2 different CSV files 1st has orders and 2nd have order details. I am trying to insert data into magento2 DB using Magento Models. so that my data will insert into all different tables and will ...
1
vote
1answer
25 views

Magento 1.9 MIME ENABLE

My Website is not show product slider missing due to MIME enable please help me how to fix this issue please check attachment screenshot images www.hafeezpk.com
2
votes
2answers
263 views

Save Button Redirecting to Same Admin Form in Magento 2

I am working on a custom module in magneto 2. i am creating an admin form using UI Component, when i click on save button Page redirects to its self Vendor\Module\Block\Adminhtml\ProductSliders\...
0
votes
2answers
120 views

magento product flat tables row size too large

When I re-index data in magento 1.x with large attribute set about 200 attributes. The got me followin MySQL error. Product Flat Data index process unknown error: exception 'PDOException' with ...
0
votes
0answers
10 views

Bundle label display

How do I display a label overlay for thumbnails, on bundle products? Is this difficult or should I find a extension. Thanks for help. Best regards Martin
1
vote
0answers
19 views

how to use walk method to join two tables in magento 2

friends, how to use the walk() method to join two tables in Magento 2 I have 2 tables and I want to join them based on some conditioning. my present code looks like this $result = array(); $...
6
votes
2answers
184 views

Empty Collection :: CollectionFactory Approach and getCollection approach both give empty result

Magento 2.3.1 Php7.2 Ubuntu 18.04 I have created a table in my database using db_schema.xml and then populated that table with sql insert commands directly in mysql workbench. My model code is &...
0
votes
1answer
79 views

add new column to catalog product entity table

I add new column to catalog_product_entity. so when i want to add new filter to collection i get this error The "user_id" attribute name is invalid. Reset the name and try again. $subject->...
0
votes
0answers
27 views

Crud module for parent and children table

i'm created crud plugin for children and parent table. Can anyone suggest how to get the data from parent table.PLease Help me. Many thanks here are may table <?php namespace ThuyNT\Crud\...
1
vote
1answer
25 views

how can we access customer session in checkout

I have one special field called some_id in customer data and I want to save the some_id and quote_id in database. I am using sales_quote_save_afterevent to save both ids. But my customer session is ...
0
votes
0answers
21 views

Return PHP values inside JS file

I have an module that I need to load some informations when the user clicks at the sync button (backend). The problem is, how to retrieve the values from the js file and put them in the form. view/...
2
votes
1answer
124 views

How to fix the related product issue in admin after migrated to magento 1 to magento 2.3

I am using Magento 2.3.0 I have migrated products from Magento 1 to Magento 2. I can see related products in product detail page in the front end and it is proper and also I can find related products ...
1
vote
1answer
49 views

How do I query on an extension attribute through the API?

I added an extension attribute to the Invoice class, and I want to be able to query the Invoice database data by my extension attribute. My extension attribute (ExportedFlag) has these properties ...
0
votes
0answers
86 views

before plugin parameter magento 2

I am writing a before plugin for below public method. public function setup($user,$pass,$url = null){ $this->username = $user; $this->password = $pass; if ($url) { ...
2
votes
0answers
43 views

Magento 2 change database collation

I am wondering if it is safe to change a magento database collation from utf-8 general_ci to utf-8 unicode_ci. I can do it from phpmyadmin or directly in mysql... I just don't know if it is safe ...
1
vote
1answer
39 views

Unable to display database table values on frontend in magento 2.1.7

I am trying to fetch table on frontend but getting this error Fatal error: Class 'Crud\Crudatfrontend\Model\ResourceModel\Post' not found in D:\xampp\htdocs\newmag\vendor\magento\framework\...
0
votes
0answers
16 views

Magento 2 admin panel add new category error Integrity constraint violation [duplicate]

Below error when Magento 2 admin panel add new category [2019-04-08 22:36:22] main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null, query was: ...
1
vote
1answer
61 views

Event Observer for import with magmi

I created an event observer to report the creation of new magento products, but the observer doesn't work when the products are created by importing Magmi. My magento version is 1.9.3.9 This is the ...
2
votes
1answer
69 views

Suddenly customer_grid_flat table delete in magento 2

I am using Magento 2.2.6. My site is working fine. But today morning I show customer_grid_flat table delete in my database. Please, someone, let me know why it's doing. Also in Admin side customer ...
1
vote
2answers
104 views

Magento 2 - Syntax error on bin/magento support:backup:db

I am trying to get backup of DB using following command php -dmemory_limit=1G bin/magento support:backup:db It is giving me syntax error: sh: 2: Syntax error: word unexpected (expecting ")") Error: ...
1
vote
2answers
48 views

magento 2 add unique key on multiple columns using installschema

Here i am trying to create unique key using installSchema . Array of column names is defined here on which columns combinedly i want to apply unique key $arrayOfColumnsName = array('column1', '...
2
votes
0answers
155 views

Magento2: How to convert weight unit to grams from kg?

I have a website in Magento2. Mageto2 provides product weight unit in KG, how an I convert it into unit Gram. I want to change the product weight unit from KG to Gram how it is possible ?.
2
votes
0answers
49 views

Magento 2.2 - How to remove product Meta Keywords maxlength validation from backend?

I want to remove validation for product meta_keyword from backend or else to increase the length of the product meta_keyword. I also tried to remove maxlength validation from vendor/magento/module-ui/...
0
votes
0answers
20 views

Same DB for multiple stagings

I am creating multiple staging servers for my Magento 2 website. staging1.mywebsite.com staging2.mywebsite.com staging3.mywebsite.com Is it possible to have single database for all 3 of my staging ...
1
vote
3answers
87 views

2.3 to 2.3.1 Upgrade showing sales_order_grid already exists

So far the upgrade went pretty smooth but now I have a few outdated modules and it's asking me to run the setup:upgrade on CLI but I keep getting an SQLSTATE general error: 1813 Tablespace for table '...
0
votes
0answers
12 views

what is difference between magento1 and magento2 sales order table list

what is difference between magento1 and magento2 sales order table related data to be stored and which table to be affected. Magento1 Sales related table Magento2 Sales related table Thank you, ...
1
vote
1answer
448 views

SQL Query for custom attribute

I have create custom attribute in product upc I want custom query (sql) to get SKUs and UPCs Can anyone tell me the related tables from where I can get data, or if anyone can share query that would ...