Skip to main content

Questions tagged [database-schema]

A description of the structure of the database - including the structure of the tables, columns, constraints, views, etc, etc... that make up the database.Normally defined in the text, generally SQL in an RDBMS, the schema describes the complete blueprint for the database, defining everything about the database except that data itself.

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

Error on setup:install at creating database schema

I ran ece-docker command to create a docker-compose file, with the following arguments: vendor/bin/ece-docker build:compose --root-dir=/var/www --host=localhost --port=80 --mode="developer" --db=5.7 --...
zanoth's user avatar
  • 1
0 votes
0 answers
66 views

Database Table Relationship and How To Save Data

I really need you guys’ help. I just can't get my head around how magento saves relational data. For instance, the catalogue-rule module has three tables, "catalogrule", "customer_group&...
Joseph Haan's user avatar
1 vote
1 answer
69 views

Best way for one time huge data insert to new custom table

I have created a new table. I will have to loop through all customers, its orders, its items details, its product details and insert to new custom table. It is a one time process. Should I use data ...
Quasar M's user avatar
  • 409
0 votes
1 answer
2k views

Magento 2.3 How can add primary key constraint combination of multiple column using db_schema.xml?

There are some custom tables in the database which don't have a primary key. A single column can not be a primary key. So I want to make a primary key with the help of existing two-column combinations....
Vinod Kumar's user avatar
  • 2,065
0 votes
1 answer
172 views

Create database entity field with digit(s)

I'm trying to add a price field into a custom entity I've created but the digit disapeared and it's rounded. How to keep 2 digits ? ->addColumn( '...
Claims's user avatar
  • 1,236
2 votes
1 answer
473 views

crc_string field in the translation table

What is the role of the field crc_string in the translation table? I know what crc is in general, but how is this field used to detect (and maybe correct) errors in the strings, if this is its real ...
Marius's user avatar
  • 198k
0 votes
1 answer
184 views

'TABLE 607 WHERE `Non_unique` = 1' - Setup Upgrade Error

When i run this command (setup:upgrade) in Magento 2. Then i am getting this error. Please tell me how to i can fix this issue. which table is 607 ? Syntax error or access violation: 1064 You have an ...
Wajahat Bashir's user avatar
1 vote
2 answers
1k views

Magento 2 - How to create a custom select field in registration form and store it in database table?

I want to create a custom select field of select a course in registration form in which i have 5 options and when user click on create account its value should store in a course column in ...
Aalap's user avatar
  • 13
0 votes
1 answer
517 views

Declare length of int column

How can I declare a size for an int? I have the following code: ... /** @var \Magento\Framework\Setup\SchemaSetupInterface $schemaSetup */ $table = $schemaSetup->getConnection() ...
domdambrogia's user avatar
3 votes
1 answer
604 views

Database schema related change reverted

I have one of my Magento 2 projects running with version 2.3.3. There are so many simple products for one single configurable product and as a result, there is an issue with the length of the SKU. To ...
B. Desai's user avatar
  • 133
1 vote
0 answers
269 views

Facing an error "Types real is not declared" in Magento 2.3.5 while running setup upgrade

Whenever tries to run the php bin/magento setup:upgrade but facing an error as follows: "Types real is not declared" I know by getting the type name of the Information schema of data type and ...
sandip's user avatar
  • 4,044
0 votes
1 answer
994 views

Allow tinytext in db_schema.xml magento 2

I'm doing a custom migration from Magento 1.9 to Magento 2.3.4 , in one of the custom module on Magento 1.9 it uses tinytext as table column type, therefore I tried to recreate this module using ...
jojo's user avatar
  • 49
0 votes
0 answers
68 views

Strange error when upgrading

when trying to run setup:upgrade i'm getting the error below. I dont remember having any issues on my store. I've tried to enable verbose on the upgrade using setup:upgrade -vv but wiithout success ...
Armindo Pereira's user avatar
1 vote
2 answers
1k views

Magento2 - Default datetime value add column

I'm using magento Magento2.3.4, I tried to add new column with datetime type and default value of current datetime like this: $columns['created_time'] = [ 'type' => \...
jojo's user avatar
  • 49
0 votes
1 answer
1k 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 ...
F.Capoccia's user avatar
0 votes
1 answer
77 views

I added a Prescription Field in my Magento 1.9 Form Page

$fieldset->addField('prescription', 'file', array( 'label' => Mage::helper('surgery')->__('Upload'), //'value' => 'Upload', 'name' => 'prescription', ...
DHEERAJ RAO's user avatar
0 votes
1 answer
150 views

Magento 1.9 Admin Panel is showing Blank...Header with no menus

Magento admin panel is showing blank with header with no menus
DHEERAJ RAO's user avatar
0 votes
0 answers
263 views

How to create a custom table in Magento 2.3 using XML (Declarative Schema) and integrate in custom admin grid?

I need to create an admin grid and for that i need to create a custom table using Declarative Schema in Magento 2.3. How to create a custom table using declarative schema and integrate the table with ...
IntraPersonalLearner's user avatar
1 vote
0 answers
48 views

How to use my custom module data as product attribute?

I have created a custom backend module(with eav attributes) in magento 2.3, where the customer can add some important data similar to this: number, number type, year. I want to show these in a ...
csba's user avatar
  • 111
0 votes
0 answers
26 views

What to do in order to allow hyperinflationary currencies? (How to increase decimals limit)

We have to allow in our multi-currency site currency that's very hyperinflationary. Base price for products are set in USD but We have some products shown in VEF that are very close to Magento 2 ...
jtalel's user avatar
  • 13
0 votes
1 answer
96 views

Error on creating UpgradeSchema.php

<?php namespace Essence\Slider\Setup; use Magento\Framework\Setup\UpgradeSchemaInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\Setup\...
Arshad Hussain's user avatar
0 votes
1 answer
905 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 ...
John's user avatar
  • 837
6 votes
1 answer
6k views

Magento 2.3.0: How to add TIMESTAMP_INIT as a default value in declarative schema?

As I'm adding CURRENT_TIMESTAMP as a default value for created_datetime and updated_datetime columns in my database table named faqs, I'm getting both the columns updated while edit the FAQ in admin ...
Dhara Bhatti's user avatar
4 votes
3 answers
9k views

How to add foreign key in db_schema.xml

I'm using magento 2.3 to create a custom module, i tried to create database tables for my custom module in etc/db_schema.xml like this: <table comment="province Table" engine="innodb&...
Idham Choudry's user avatar
1 vote
0 answers
78 views

InstallScheme Script for dynamic rows Magento 2

I have created dynamic rows on product creation form. I have to save their value in custom table and retrieve as a dropdown on frontend product detail page w.r.t product ID. I am aware of the event ...
Ajwad Syed's user avatar
  • 1,591
0 votes
1 answer
1k views

Magento 2 - add a custom input field below the cash on delivery radio button and save to quote_payment table

Need to add an input field below the Cash on delivery radio button. Implemented the code by this link where the input is added below COD radio but the value is not added to the database. Can anyone ...
Ejilarasan J's user avatar
1 vote
1 answer
221 views

Magento 2 : Please upgrade your database while database is newer than required

I am getting this error when moving Magento 2 website to Google Cloud (Click to Deploy). I have merged theme files and media files and it worked fine. When I have connected to my old database it ...
Khaled Bin Amir's user avatar
0 votes
0 answers
180 views

I need to create a new module to table exists with another prefix of mam

I need to create a new module and this project have tables with other prefixes, How I omit this default prefix in my file /Model/ModelTable.php this is the code inside: namespace Arkix\Zonas\Model\...
andrwsv's user avatar
3 votes
2 answers
4k views

How to create custom table in magento 2.3(via XML) by module?

After reading change log for Magento2.3, I come to know now onward in Magento we can add custom table via xml. so there would be no PHP way to create a table. So can any one tell me how can I add a ...
Shivam Pastor's user avatar
18 votes
3 answers
28k views

Magento 2.3 : How to implement declarative schema in custom module

I install the magento 2.3 and I'm creating custom module. But, I don't know how to create custom database table in magento 2.3 version.
harsh khandhar's user avatar
0 votes
1 answer
254 views

How to delete table from mysql when uninstall extension frommagento 2.2.6?

I have created an extension with the schema. It is installed correctly and tables are created correctly in the database. But, now I want to uninstall that extension. But with uninstall, I also want ...
1990rk4's user avatar
  • 593
0 votes
1 answer
271 views

Customer_Eav db schema version is not properly set

I am using Magento 2.2.5 and getting this error. 1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento ...
sam's user avatar
  • 489
0 votes
2 answers
3k views

Installation fails on "Installing database schema"

When installing Magento 2.0, the "Customize your store" page shows there is an error (although there are no details under the "show details" link). It will proceed past this point, however when ...
Benjamin G's user avatar