denny/ShinyCMS

View on GitHub
bin/database/deploy-schema

Summary

Maintainability
Test Coverage
#!/usr/bin/env perl

# ===================================================================
# File:        bin/database/deploy-schema
# Project:    ShinyCMS
# Purpose:    Deploy the database schema from the DBIC modules
# 
# Author:    Denny de la Haye <2019@denny.me>
# Copyright (c) 2009-2019 Denny de la Haye
# 
# ShinyCMS is free software; you can redistribute it and/or modify it
# under the terms of either the GPL 2.0 or the Artistic License 2.0
# ===================================================================

use strict;
use warnings;

# Load local helper script for fetching schema
use FindBin qw( $Bin );
use lib "$Bin/../lib";
require 'helpers.pl';  ## no critic

my $schema = get_schema();

# Deploy the schema
$schema->deploy({ add_drop_table => 1 });