mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
replace pubkey with deriveX_pubkey and root_pubkey to let db tell more about the structure
This commit is contained in:
parent
ac5e93c813
commit
7ce40c780e
@ -33,8 +33,8 @@ export class Account {
|
||||
@Column({ name: 'derivation_index', type: 'int', unsigned: true })
|
||||
derivationIndex: number
|
||||
|
||||
@Column({ type: 'binary', length: 32, unique: true })
|
||||
pubkey: Buffer
|
||||
@Column({ name: 'derive2_pubkey', type: 'binary', length: 32, unique: true })
|
||||
derive2Pubkey: Buffer
|
||||
|
||||
@Column({ type: 'tinyint', unsigned: true })
|
||||
type: number
|
||||
|
||||
@ -20,14 +20,14 @@ export class Community {
|
||||
@Column({ name: 'iota_topic', collation: 'utf8mb4_unicode_ci' })
|
||||
iotaTopic: string
|
||||
|
||||
@Column({ type: 'binary', length: 32, unique: true })
|
||||
pubkey: Buffer
|
||||
@Column({ name: 'root_pubkey', type: 'binary', length: 32, unique: true })
|
||||
rootPubkey: Buffer
|
||||
|
||||
@Column({ type: 'binary', length: 32, nullable: true })
|
||||
privkey?: Buffer
|
||||
@Column({ name: 'root_privkey', type: 'binary', length: 32, nullable: true })
|
||||
rootPrivkey?: Buffer
|
||||
|
||||
@Column({ type: 'binary', length: 32, nullable: true })
|
||||
chaincode?: Buffer
|
||||
@Column({ name: 'root_chaincode', type: 'binary', length: 32, nullable: true })
|
||||
rootChaincode?: Buffer
|
||||
|
||||
@Column({ type: 'tinyint', default: true })
|
||||
foreign: boolean
|
||||
|
||||
@ -16,8 +16,8 @@ export class User extends BaseEntity {
|
||||
})
|
||||
gradidoID?: string
|
||||
|
||||
@Column({ type: 'binary', length: 32, unique: true })
|
||||
pubkey: Buffer
|
||||
@Column({ name: 'derive1_pubkey', type: 'binary', length: 32, unique: true })
|
||||
derive1Pubkey: Buffer
|
||||
|
||||
@Column({
|
||||
name: 'created_at',
|
||||
|
||||
@ -18,7 +18,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
CREATE TABLE IF NOT EXISTS \`users\` (
|
||||
\`id\` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
\`gradido_id\` char(36) DEFAULT NULL,
|
||||
\`pubkey\` binary(32) NOT NULL,
|
||||
\`derive1_pubkey\` binary(32) NOT NULL,
|
||||
\`created_at\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
\`confirmed_at\` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (\`id\`),
|
||||
@ -31,7 +31,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
\`id\` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
\`user_id\` int(10) unsigned DEFAULT NULL,
|
||||
\`derivation_index\` int(10) unsigned NOT NULL,
|
||||
\`pubkey\` binary(32) NOT NULL,
|
||||
\`derive2_pubkey\` binary(32) NOT NULL,
|
||||
\`type\` tinyint unsigned NOT NULL,
|
||||
\`created_at\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
\`confirmed_at\` datetime DEFAULT NULL,
|
||||
@ -47,9 +47,9 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
CREATE TABLE IF NOT EXISTS \`communities\` (
|
||||
\`id\` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
\`iota_topic\` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
\`pubkey\` binary(32) NOT NULL,
|
||||
\`privkey\` binary(32) DEFAULT NULL,
|
||||
\`chaincode\` binary(32) DEFAULT NULL,
|
||||
\`root_pubkey\` binary(32) NOT NULL,
|
||||
\`root_privkey\` binary(32) DEFAULT NULL,
|
||||
\`root_chaincode\` binary(32) DEFAULT NULL,
|
||||
\`foreign\` tinyint(4) NOT NULL DEFAULT true,
|
||||
\`gmw_account_id\` int(10) unsigned DEFAULT NULL,
|
||||
\`auf_account_id\` int(10) unsigned DEFAULT NULL,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user