mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	Increase column width of vault_key on mysql (#14231)
* resolves The default schema used in the mysql backend is insufficient for KVv2 storage #14114 * increases column width of vault_key from 512 to 3072 in mysql physical backend * updates changelog
This commit is contained in:
		
							
								
								
									
										3
									
								
								changelog/14231.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								changelog/14231.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| ```release-note:bug | ||||
|  physical/mysql: Create table with wider `vault_key` column when initializing database tables. | ||||
| ``` | ||||
| @@ -120,7 +120,7 @@ func NewMySQLBackend(conf map[string]string, logger log.Logger) (physical.Backen | ||||
| 	// Create the required table if it doesn't exists. | ||||
| 	if !tableExist { | ||||
| 		create_query := "CREATE TABLE IF NOT EXISTS " + dbTable + | ||||
| 			" (vault_key varbinary(512), vault_value mediumblob, PRIMARY KEY (vault_key))" | ||||
| 			" (vault_key varbinary(3072), vault_value mediumblob, PRIMARY KEY (vault_key))" | ||||
| 		if _, err := db.Exec(create_query); err != nil { | ||||
| 			return nil, fmt.Errorf("failed to create mysql table: %w", err) | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dave Rawks
					Dave Rawks