How To Install python-alembic on CentOS 7

In this tutorial we learn how to install python-alembic on CentOS 7. python-alembic is Database migration tool for SQLAlchemy

Introduction

In this tutorial we learn how to install python-alembic on CentOS 7.

What is python-alembic

Alembic is a new database migrations tool, written by the author of SQLAlchemy. A migrations tool offers the following functionality * Can emit ALTER statements to a database in order to change the structure of tables and other constructs. * Provides a system whereby “migration scripts” may be constructed; each script indicates a particular series of steps that can “upgrade” a target database to a new version, and optionally a series of steps that can “downgrade” similarly, doing the same steps in reverse. * Allows the scripts to execute in some sequential manner. Documentation and status of Alembic is at http

We can use yum or dnf to install python-alembic on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install python-alembic.

Install python-alembic on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install python-alembic using yum by running the following command:

sudo yum -y install python-alembic

Install python-alembic on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install python-alembic using dnf by running the following command:

sudo dnf -y install python-alembic

How To Uninstall python-alembic on CentOS 7

To uninstall only the python-alembic package we can use the following command:

sudo dnf remove python-alembic

References

Summary

In this tutorial we learn how to install python-alembic on CentOS 7 using yum and dnf.