# # spec file for package perl-ORLite-Migrate # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name ORLite-Migrate Name: perl-ORLite-Migrate Version: 1.100.0 Release: 0 # 1.10 -> normalize -> 1.100.0 %define cpan_version 1.10 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Extremely light weight SQLite-specific schema migration URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/A/AD/ADAMK/%{cpan_name}-%{cpan_version}.tar.gz Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(DBD::SQLite) >= 1.21 BuildRequires: perl(DBI) >= 1.58 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.62 BuildRequires: perl(File::Path) >= 2.04 BuildRequires: perl(File::Spec) >= 3.27 BuildRequires: perl(File::Which) >= 1.07 BuildRequires: perl(File::pushd) >= 1.00 BuildRequires: perl(IPC::Run3) >= 0.042 BuildRequires: perl(ORLite) >= 1.280 BuildRequires: perl(Params::Util) >= 0.37 BuildRequires: perl(Probe::Perl) >= 0.01 Requires: perl(DBD::SQLite) >= 1.21 Requires: perl(DBI) >= 1.58 Requires: perl(File::Path) >= 2.04 Requires: perl(File::Spec) >= 3.27 Requires: perl(File::Which) >= 1.07 Requires: perl(File::pushd) >= 1.00 Requires: perl(IPC::Run3) >= 0.042 Requires: perl(ORLite) >= 1.280 Requires: perl(Params::Util) >= 0.37 Requires: perl(Probe::Perl) >= 0.01 Provides: perl(ORLite::Migrate) = %{version} Provides: perl(ORLite::Migrate::Patch) = %{version} Provides: perl(ORLite::Migrate::Timeline) = %{version} %undefine __perllib_provides %{perl_requires} %description SQLite is a light weight single file SQL database that provides an excellent platform for embedded storage of structured data. ORLite is a light weight single class Object-Relational Mapper (ORM) system specifically designed for (and limited to only) work with SQLite. ORLite::Migrate is a light weight single class Database Schema Migration enhancement for ORLite. It provides a simple implementation of schema versioning within the SQLite database using the built-in 'user_version' pragma (which is set to zero by default). When setting up the ORM class, an additional 'timeline' parameter is provided, which should be either a monolithic timeline class, or a directory containing standalone migration scripts. A *"timeline"* is a set of revisioned schema changed, to be applied in order and representing the evolution of the database schema over time. The end of the timeline, representing by the highest revision number, represents the "current" anticipated schema for the application. Because the patch sequence can be calculated from any arbitrary starting version, by keeping the historical set of changes in your application as schema patches it is possible for the user of any older application version to install the most current version of an application and have their database upgraded smoothly and safely. The recommended location to store the migration timeline is a shared files directory, locatable using one of the functions from File::ShareDir. The timeline for your application can be specified in two different forms, with different advantages and disadvantages. %prep %autosetup -n %{cpan_name}-%{cpan_version} %build PERL_USE_UNSAFE_INC=1 perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README %license LICENSE %changelog