<commit_before>-- create new database after install
-- need to do these as mysql root user

--CREATE USER IF NOT EXISTS 'sqluser'@'localhost' IDENTIFIED BY '<PASSWORD>';
--GRANT ALL PRIVILEGES ON coindb.* TO 'sqluser'@'localhost';
--FLUSH PRIVILEGES;

-- disabled for safety
-- DROP DATABASE IF EXISTS coindb;

CREATE DATABASE IF NOT EXISTS coindb;
USE coindb;

CREATE TABLE IF NOT EXISTS `blocks` (
  `id` int(11) NOT NULL,
  `hash` binary(32) NOT NULL,
  `coinbase` varbinary(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `address` (
  `id` decimal(13) NOT NULL,
  `addr` binary(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `bech32` (
  `id` decimal(13) NOT NULL,
  `addr` binary(32) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `trxs` (
  `id` decimal(13) NOT NULL,
  `hash` binary(32) NOT NULL,
  `ins` tinyint unsigned NOT NULL,
  `outs` tinyint unsigned NOT NULL,
  `txsize` smallint unsigned NOT NULL,
  `txdata` decimal(13,0) DEFAULT NULL,
  `block_id` decimal(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `block` (`block_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `outputs` (
  `id` decimal(16) NOT NULL,
  `value` decimal(16) DEFAULT NULL,
  `addr_id` decimal(13) DEFAULT NULL,
  `tx_id` decimal(13) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `addr` (`addr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;<commit_msg>update user pwd as separate stmnt<commit_after>-- create new database after install
-- need to do these as mysql root user

--CREATE USER IF NOT EXISTS 'sqluser'@'localhost';
--ALTER USER 'sqluser'@'localhost' IDENTIFIED BY '<PASSWORD>';
--GRANT ALL PRIVILEGES ON coindb.* TO 'sqluser'@'localhost';
--FLUSH PRIVILEGES;

-- disabled for safety
-- DROP DATABASE IF EXISTS coindb;

CREATE DATABASE IF NOT EXISTS coindb;
USE coindb;

CREATE TABLE IF NOT EXISTS `blocks` (
  `id` int(11) NOT NULL,
  `hash` binary(32) NOT NULL,
  `coinbase` varbinary(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `address` (
  `id` decimal(13) NOT NULL,
  `addr` binary(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `bech32` (
  `id` decimal(13) NOT NULL,
  `addr` binary(32) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `trxs` (
  `id` decimal(13) NOT NULL,
  `hash` binary(32) NOT NULL,
  `ins` tinyint unsigned NOT NULL,
  `outs` tinyint unsigned NOT NULL,
  `txsize` smallint unsigned NOT NULL,
  `txdata` decimal(13) DEFAULT NULL,
  `block_id` decimal(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `block` (`block_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `outputs` (
  `id` decimal(16) NOT NULL,
  `value` decimal(16) DEFAULT NULL,
  `addr_id` decimal(13) DEFAULT NULL,
  `tx_id` decimal(13) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `addr` (`addr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
{'fraction_non_alphanumeric': 0.1267741935483871, 'fraction_numerical': 0.024838709677419354, 'mean_word_length': 4.547406082289803, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '608879', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1133, 'n_words': 385}