Comments (5)
thanks, fixed
from ocore.
Adding only the BINARY
doesn't seem to be enough:
mysql> CREATE TABLE asset_metadata2 (
-> asset CHAR(44) BINARY NOT NULL PRIMARY KEY,
-> metadata_unit CHAR(44) BINARY NOT NULL,
-> registry_address CHAR(32) NULL, -- filled only on the hub
-> suffix VARCHAR(20) NULL, -- added only if the same name is registered by different registries for different assets, equal to registry name
-> name VARCHAR(20) NULL,
-> decimals TINYINT NULL,
-> creation_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-> UNIQUE byNameRegistry(name, registry_address),
-> FOREIGN KEY byAsset(asset) REFERENCES assets(unit),
-> FOREIGN KEY byMetadataUnit(metadata_unit) REFERENCES units(unit)
-> );
ERROR 1215 (HY000): Cannot add foreign key constraint
Adding charset similarly to other tables:
mysql> CREATE TABLE asset_metadata2 (
-> asset CHAR(44) BINARY NOT NULL PRIMARY KEY,
-> metadata_unit CHAR(44) BINARY NOT NULL,
-> registry_address CHAR(32) NULL, -- filled only on the hub
-> suffix VARCHAR(20) NULL, -- added only if the same name is registered by different registries for different assets, equal to registry name
-> name VARCHAR(20) NULL,
-> decimals TINYINT NULL,
-> creation_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-> UNIQUE byNameRegistry(name, registry_address),
-> FOREIGN KEY byAsset(asset) REFERENCES assets(unit),
-> FOREIGN KEY byMetadataUnit(metadata_unit) REFERENCES units(unit)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Query OK, 0 rows affected (0.40 sec)
from ocore.
The mysql I use is:
Server version: 5.7.19 MySQL Community Server (GPL)
from ocore.
added ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
too, thanks
from ocore.
The asset_metadata
seems ok now, but the same error happens with a newly added sent_mnemonics
. The unit
field needs the BINARY
flag I believe to be able to use as foreign key. See the error below:
ERROR 1215 (HY000) at line 691: Cannot add foreign key constraint
from ocore.
Related Issues (20)
- Question : what's the purpose of witness proof in catch up process ? HOT 1
- Catchup is slow when tps is more than 60 HOT 2
- "inputs and outputs do not balance" - composer and validator inconsistency HOT 2
- resend multi-sig wallet creation notification
- Question: Can user change a shared_address's definition by sending a definition_change unit ? HOT 1
- Question : Does 'send to address' make always new change address? HOT 1
- Error: Error: SQLITE_ERROR: too many SQL variables HOT 1
- "unstable unit not found: "+best_parent_unit HOT 1
- ParentFingerPrint argument is not a buffer HOT 2
- did not check whether the amount is real HOT 3
- iPhone & Apple watch notification
- Add method on the WS API to retrieve AA state vars? HOT 1
- backups not possible when node is only HOT 4
- Introduce logging framework HOT 10
- Introduce health check HOT 1
- Allow to externalize crypto operations to HSM HOT 4
- Fork byteball Tortik HOT 8
- 'wrong profile hash' message is shown incorrectly in live and testnet HOT 2
- Is there no way to set an alias for an asset? HOT 1
- ER_BAD_FIELD_ERROR: Unknown column 'getters' in 'field list' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocore.