magento 2.0.7 – Some modules use code versions newer or older than the database. First update the module code, then run & # 39; setup: upgrade & # 39;

The code base of the module does not match the DB schema and data.
Magento_Theme scheme: 2.0.1 -> 2.0.0
Magento_Theme data: 2.0.1 -> 2.0.0
Magento client schema: 2.0.9 -> 2.0.6
Magento client data: 2.0.9 -> 2.0.6
Diagram of Magento_Cms: 2.0.1 -> 2.0.0
Data of Magento_Cms: 2.0.1 -> 2.0.0
Magento registration scheme: 2.1.3 -> 2.0.3
Magento catalog data: 2.1.3 -> 2.0.3
Magento_Search scheme: 2.0.4 -> 2.0.1
Magento_Search data: 2.0.4 -> 2.0.1
Schematic of Magento_Quote: 2.0.3 -> 2.0.2
Data of the Magento appointment: 2.0.3 -> 2.0.2
Schema Magento_Msrp: 2.1.3 -> 2.0.0
Magento_Msrp data: 2.1.3 -> 2.0.0
Magento_Bundle scheme: 2.0.2 -> 2.0.1
Magento_Bundle data: 2.0.2 -> 2.0.1
Downloadable Magento schema: 2.0.1 -> 2.0.0
Magento_Downloadable data: 2.0.1 -> 2.0.0
Magento sales scheme: 2.0.3 -> 2.0.1
Magento sales data: 2.0.3 -> 2.0.1
Diagram Magento_CatalogInventory: 2.0.1 -> 2.0.0
Magento_CatalogInventory data: 2.0.1 -> 2.0.0
Schematic of Magento_GroupedProduct: 2.0.1 -> 2.0.0
Magento_GroupedProduct data: 2.0.1 -> 2.0.0
Magento integration scheme: 2.2.0 -> 2.0.1
Magento integration data: 2.2.0 -> 2.0.1
Schema Magento_CatalogRule: 2.0.1 -> 2.0.0
Data of Magento_CatalogRule: 2.0.1 -> 2.0.0
Schema Magento_SalesRule: 2.0.1 -> 2.0.0
Magento_SalesRule data: 2.0.1 -> 2.0.0
Schema Magento_Swatches: 2.0.1 -> 2.0.0
Magento_Swatches data: 2.0.1 -> 2.0.0
Schema Magento_GiftMessage: 2.0.1 -> 2.0.0
Magento_GiftMessage data: 2.0.1 -> 2.0.0
Some modules use code versions that are newer or older than the database. First update the module code, then run & # 39; setup: upgrade & # 39 ;.

How do I force a selection of elements to a specific user / database row?

I have a database that allows a company to register, then the user of the company can register individual "user" accounts.

The administrator of the company (who configures the company's account) can log in with a password, however, the user accounts he / she creates are assigned a smart card based on a smart card serial number.

this works, however, I would like to restrict the selection of smart cards only to those that have been issued for the selected "company".

Currently, I have a form that allows me to create a range of smart cards.

I have a drop-down search for the user that allows me to select a smart card, however, it will show all available smart cards that I have created.

When would the best places be and how would it be achieved to ensure that there is only a range of smart cards available when a company administrator is creating individual accounts?

I have uploaded a picture of my current scheme and I am currently using Microsoft's access to conceptual design, but I will move to SQL and use asp.net.

Thanks in advance.enter the description of the image here
Stephen

magento2 – Magento 2 obtains the certificate registration of the database in a custom class

I'm new to Magento,

When I'm editing an existing record through a custom form,

in the user selection multiple selection component I provide all the views of the store.

The problem is that I need to have pre-selected values, but I do not know

how to get the editing record ID and extract correct data from the database.

Thank you!

Generate DDL file for Postgresql using oracle datamodeler database modeling tool

In the oracle datamodeler tool I can create the relational model of the database, then I did the engineering to generate the physical model and from there I can generate the script to create the database, and among the database engine options are: sql server, oracle 11g, dBase, etc .. But postgresql is not found and I need the DDL for Postgresql ..
Help!!

Database design – Model a multiple 1-m ratio with a single entity

I have an entity called Box. This box has a since property that could be from a variety of different entities. It could be from a user, office, to import, storage and many more.

So far I can think of two ways to model this:

Focus one:

| box_id | box_content | from_user | from_office | from_import | from_storage | ...
| -------- | ------------- | ----------- | ------------- | ------------- | -------------- | ------ |
| box_1 | apple user_a | null null null null
| box_2 | orange | null null import_b | null null

Focus 2:

BOX
| box_id | box_content |
| -------- | ------------- |
| box_1 | Apple
| box_2 | orange |

USER
| user_id | name |
| --------- | ------- |
| user_a | Rick |
| user_b | David |

USER <-> BOX
| user_id | box_id |
| --------- | -------- |
| user_a | box_1 |

TO IMPORT <-> BOX
| import_id | box_id |
| ----------- | -------- |
| import_a | box_2 |

But I do not like both ways because in focus 1 there are so many null columns and in focus 2 I need to create a new relationship table every time there is a new since entity. Is there a better way to model this in a relational database?

mysql – Password encrypted with BCRYPT in the database different from the password entered by the user when starting PHP session

good,

I am trying to create a webpanel and a friend suggested that I encrypt the passwords of the users with BCRYPT for their security.

My problem when trying to login, the encrypted password that is saved in the database is different from the one that is sent in the SQL request.

For example, this is the main part of my code to validate the user's credentials:

File: passwordEncryptor.php

    14,
];
return password_hash ($ password, PASSWORD_BCRYPT, $ options);
}

?>

File: login.php


In the event that the password stored in the database that was entered using the same function (passwordEncryptor) is "1234", that is "$ 2y $ 14 $ gyyo5OaMe4SeXIhRStbdjOnZZrb3IOdCoIOQlzPZj15MhGBHUjniq", because it is that at the time of authentication the query is:

SELECT * FROM pcd_users WHERE email = & # 39; teste@teste.com & # 39; AND password = & # 39; $ 2and $ 14 $ O6iOBsAyv0JqwGudQhKPB.f68nLthfoMlJUU8n8zRuXxFJubhe7CO & # 39;

database – How / when to normalize during ETL?

Let's say you're loading a de-normalized flat file of purchase transactions that looks like this:

| location_name | location_zip | product | product_price |
| --------------- | -------------- | --------- | -------- ------- |
| downtown 90001 | french fries 2,99 |
| west side | 90048 | burger 5.99 |
etc ....

in a SQL database. In a normalized star schema database, you would have tables for the locations where the zip file is stored and for the products where the price is stored.

So what should be loading in the shopping table is this:

| location_id | product_id |
| ------------- | ------------ |
| 01 | 01 |
| 02 | 02 |
etc ....

My question is, how can we normalize the data in this way during the ETL process, before they enter the database? The process is complicated by the fact that it is possible that some locations already exist in the database with assigned IDs and others do not. It would be very inefficient to consult the database before inserting each purchase row to determine (or insert a new) location and product identification.

Any general advice on how to approach this problem would be greatly appreciated!

mysql – MariaDB 10.2 crashes in innodb table corruption – trying to restore the database

I am running MariaDB 10.2 on Windows and I had some damage to my server's hard drive that ruined some innodb tables. Unfortunately, this also affected the backups, so I'm trying to dump the tables and restore them.

The problem is that, even with forced recovery set to 6, the server will be blocked when it reaches a damaged row. Dumping the table with asc and then desc worked for one table, but not for another and any attempt to skip the row with the limit and the compensation is still blocked.

I saw that there was a innodb_pass_corrupt_table_action = salvage Option in 10.1, but it is in disuse and is ignored with 10.2. Is there a similar configuration for 10.2? Are there other options to force MySQL to dump the tables? Thank you!

mysql – order a Select by criteria outside the database

I would like to create a SELECT with the personnel relationship here of my company.

SELECT function, name FROM responsible;

Until then all good. But how to order from the Manager, going through the Manager, Supervisor to General Service Assistant, in this order?

THAT IS:

MANAGER, FULANO;
MANAGER, CYCLONE;
SUPERVISOR, BETHANY;
AUX. OF SERV. GENERAL, REGION;

In this order.

Why can only one view of SQL Server be removed in the current database?

I just noticed this and was having a hard time finding a technical reason for it.

Tables can be deleted using three part names, but views are restricted to two part names.

What is the reasoning behind this?