用 Bytebase 实现可回滚的数据库数据变更

数据库 CI/CD 工具 -- Bytebase 介绍 在本文中,我们首先向读者展示了 Bytebase 的安装部署过程,以及其查询和更改的基本功能。接着,我们体验了 Bytebase 1.14.0 最新版本所带来的 ChatSQL 功能,该功能基于 OpenAI,能够根据我们的问题或需求生成相应的 SQL 语句。最后,我们实践了 Bytebase 的 GitOps 功能,通过结合版本控制系统,可以跟踪数据库结构的变化,方便我们对数据库变更进行审查、协作和回滚操作。 阅读详情

在修改数据库的数据时,建议先备份即将修改的数据,以便在需要时能够恢复。Bytebase 提供了「数据回滚」的功能来帮助实现这一功能。本教程将为你演示这一过程。

file

准备

  1. 请确保已安装 Docker,如果本地没有重要的现有 Bytebase 数据,可以通过 rm -rf ~/.bytebase/data 从头开始。

  2. 这是企业版的功能,您可以通过添加小助手申请(见文末二维码)。

过程

第一步 - 启动 Bytebase 并升级至企业计划

  1. 复制并粘贴命令,通过 Docker 启动 Bytebase。
docker run --rm --init \
  --name bytebase
  --publish 8080:8080 --pull always \
  --volume ~/.bytebase/data:/var/opt/bytebase \
  bytebase/bytebase:2.21.0

(这里的 2.21.0 可以替换成最新版本)
  1. 注册第一个账户,它将自动获得工作区管理员角色。

  2. 点击右上角的设置齿轮图标,然后点击工作区 > 订阅上传许可。

  3. 单击铅笔图标,选择要启用企业功能的实例,然后单击确认。这里是将许可分配给了实例,为对应实例开启企业版功能。

Bytebase 2.0 - 把 DevOps 带进数据库 近期 AI 领域的突破让大家都很兴奋,但回到日常的工作中,开发者们还是需要处理许多的琐事。其中之一就是和数据库打交道,一件繁琐但又需要格外仔细的工作,不然就容易造成 #删库跑路 的事故。2 年前,我们启动了 Bytebase 来解决这个问题,并且把项目开源在了 GitHub 上。相比于全球范围内的友商 Liquibase,Flyway,还是国内的 Yearning,Archery,Bytebase 的增长速度也都是更快的。 阅读详情

相关推荐

数据库管理审计工具Bytebase快速部署

Bytebase 是一个开源数据库 DevOps 工具,它是用于在整个应用程序开发生命周期中管理数据库的 GitLab/GitHub。由于 GitLab/GitHub 为团队提供了 GUI 和协作工作区来管理代码,因此 Bytebase 在管理数据库方面也做了类似的工作.

weixin_44151123的博客 1364

2026数据库管理工具横评:NineData、Bytebase、Archery选型指南

数据库管理工具的核心价值早已超越“连库查数”,逐步转向SQL审核、变更管控与流程治理。在团队协作场景下,如何将开发者的SQL操作纳入可审计、可回滚、可追溯的规范体系,成为数据库DevOps落地的关键命题。NineData社区版以全功能数据管理平台切入,兼顾多源连接与数据同步;Bytebase社区版侧重研发流程内嵌,将SQL审核融入GitLab/GitHub的MR管线;Archery则延续DBA主导的工单模型,强在审批流与审计能力。三款工具均支持私有化部署、覆盖主流数据库,但定位、运维成本与适用团队规模差异显

weixin_33423874的博客 363

数据库即代码实战:Bytebase/dbhub 部署与协作流程详解

在软件工程领域,版本控制和持续集成已成为现代开发流程的基石,它们通过自动化与标准化显著提升了代码质量和团队协作效率。然而,数据库结构变更的管理却长期停留在手动执行SQL脚本的原始阶段,存在执行记录缺失、环境不一致和回滚困难等痛点。数据库即代码理念应运而生,它将数据库Schema视为源代码,通过Git进行版本控制,并引入代码评审和自动化部署流程,从而实现对数据库变更的可追溯、可审核和可自动化管理。这一理念在工程实践中落地为类似Bytebase/dbhub的协作平台,其核心价值在于将成熟的软件开发实践应用于数据

weixin_26848497的博客 253

5G NR协议栈及功能1 - 总体架构与物理层

  备注:本文所有图片均来自3GPP标准,包括3GPP TS 38.300 V15.0.0 (2017-12)和3GPP TS 38.202 V15.0.0 (2017-12)等。本文主要介绍截止目前(2018年1月25日),3GPP 5G NR相关的协议内容,后期可能会有更新。   本系列共分为两部分:   1. 5G NR协议栈及功能1 - 总体架构与物理层 http://blog...

Wei Xingguang 11万+

能量机关 STM32HAL库开发大疆A板WS2812B彩灯(PWM+DMA)

本文主要目的是为了制作RoboMaster比赛能量机关的灯条控制,模拟比赛场中大符,搭建出类似场地道具,以供视觉测试 使用的是RoboMaster开发板A型,芯片为STM32F427IIH6,使用的灯条为WS2812B。 采用PWM+DMA控制,使用CUBEMX配置底层,keil5编辑烧录代码 实现:一共五片扇叶,每片扇叶均实现流水灯+常亮颜色 参考文章在后面会标记出来

m0_51756449的博客 4294

保姆级教程:Win10/Win11系统下ArcGIS 10.2中文版完整安装与破解(含License Manager启动失败解决方案)

本文提供Windows 10/11系统下ArcGIS 10.2中文版的完整安装与破解教程,重点解决License Manager启动失败等常见问题。从安装准备、破解文件处理到最终配置验证,详细指导用户完成每一步操作,确保软件正常运行。特别针对主机名修改、端口占用等疑难问题提供专业解决方案。

weixin_29596051的博客 561

Juniper SRX PPPoE配置

set interfaces pp0 unit 1 ppp-options chap default-chap-secret 拨号用户名密码。set interfaces pp0 unit 0 ppp-options chap default-chap-secret 拨号密码。set interfaces pp0 unit 0 ppp-options chap local-name 拨号用户名。6号口接运营商进行拨号。

Jian Sun_的博客 753

Python爬虫实战:股票历史数据抓取与量化回测全流程详解

我们以**东方财富网(eastmoney.com)和雪球网(xueqiu.com)**为主要目标,演示如何爬取A股历史行情。最常用的HTTP请求库,简单易用,适合静态页面数据请求。本文详细介绍了从股票历史数据抓取到简单回测的完整流程,代码示例基于最新技术,结构清晰,适合初学者和进阶者学习量化投资实战。希望对你入门Python爬虫和量化交易有所帮助!

2201_76125261的博客 1782

Coze实战:解锁多Bot协同与条件分支工作流的奥秘

本文详细介绍了在字节跳动Coze平台实现多Bot协同与条件分支工作流的方法。首先阐述了Coze平台的功能优势,包括丰富的插件、知识库和工作流功能。随后分步骤讲解了多Bot协同的实现:从准备工作、创建Bot到协同配置,并提供了电商客服的实例演示。在条件分支工作流部分,详细说明了条件节点的作用类型、条件设定方法以及具体配置操作,强调测试优化的重要性。最后通过电商平台综合案例,展示了多Bot协同与条件分支的实际应用效果,并针对常见问题提供解决方案。文章为开发者在Coze平台上构建智能应用提供了实用指导,有助于提升

远程部署调试 运行安装 项目调试 二次开发 项目技术新 持续迭代 部分源码免费分享 452

17、激光切割质量影响因素及优化研究

本文研究了激光切割过程中焦点位置、入射角、激光功率、切割速度和气体压力等因素对切割质量的影响,采用响应面方法(RSM)和Box-Behnken设计,基于三种不同喷嘴对SS 304不锈钢进行实验。通过建立切缝宽度比和条纹深度的回归模型,并结合方差分析验证模型有效性,深入分析各参数对切割质量的影响机制。研究发现喷嘴结构差异显著影响参数作用趋势,尤其在切割速度和气体压力响应上表现明显。最终通过多目标优化确定最小激光功率、适中切割速度和最大气体压力为最优组合,显著提升切割质量,为实际生产提供了理论依据和技术支持。未

grape的博客 132

【QT开发教程】Qt中的数据加密与解密

在现代应用程序中,数据加密与解密是保护敏感信息的重要手段。Qt本身并不直接提供数据加密与解密的支持,但可以使用第三方库,如OpenSSL或Crypto++,来实现这一功能。本文将介绍如何在Qt中使用OpenSSL进行数据加密与解密,包括基本概念、使用方法以及一些实际的示例。

科技改变人类,技术成就未来 1158

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

上一篇: 破案了,最后背刺 OtterTune 的是这家数据库厂商
下一篇: 基于宝塔的 Bytebase 可视化安装、配置、部署教程
Bytebase
博客等级 码龄5年 1350粉丝 258原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值