Add new columns to schema.xml and regenerate sql

This commit is contained in:
Lucas Bickel 2017-03-10 21:18:50 +01:00
parent 86ff6e8e12
commit 095ddaed38
5 changed files with 18 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<?php
// This file generated by Propel 1.7.0 convert-conf target
// from XML runtime conf file /home/sourcefabric/dev/Airtime/airtime_mvc/build/runtime-conf.xml
// from XML runtime conf file /vagrant/airtime_mvc/build/runtime-conf.xml
$conf = array (
'datasources' =>
array (

View File

@ -1,6 +1,6 @@
#Note: project.home is automatically generated by the propel-install script.
#Any manual changes to this value will be overwritten.
project.home = /home/sourcefabric/dev/Airtime/airtime_mvc
project.home = /vagrant/airtime_mvc
project.build = ${project.home}/build
#Database driver

View File

@ -154,6 +154,11 @@
<column name="image_path" phpName="DbImagePath" type="VARCHAR" size="255" required="false" defaultValue=""/>
<!-- Fully qualified path for the image associated with this show.
Default is /path/to/stor/dir/:ownerId/show-images/:showId/imageName -->
<column name="has_autoplaylist" phpName="DbHasAutoPlaylist" type="BOOLEAN" required="true" defaultValue="false"/>
<column name="autoplaylist_id" phpName="DbAutoPlaylistId" type="INTEGER" required="false"/>
<foreign-key foreignTable="cc_playlist" name="cc_playlist_autoplaylist_fkey" onDelete="SETNULL">
<reference local="autoplaylist_id" foreign="id"/>
</foreign-key>
</table>
<table name="cc_show_instances" phpName="CcShowInstances">
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
@ -173,6 +178,7 @@
instances can be regenerated if we edit the show, which is unwanted behaviour. This column serves
to ensure that we don't regenerate the instance. -->
<column name="modified_instance" phpName="DbModifiedInstance" type="BOOLEAN" required="true" defaultValue="false" />
<column name="autoplaylist_built" phpName="DbAutoPlaylistBuilt" type="BOOLEAN" required="true" defaultValue="false"/>
<foreign-key foreignTable="cc_show" name="cc_show_fkey" onDelete="CASCADE">
<reference local="show_id" foreign="id"/>
</foreign-key>

View File

@ -1,5 +1,5 @@
-- Schema version
INSERT INTO cc_pref("keystr", "valstr") VALUES('schema_version', '2.5.12');
INSERT INTO cc_pref("keystr", "valstr") VALUES('schema_version', '3.0.0-alpha');
INSERT INTO cc_subjs ("login", "type", "pass") VALUES ('admin', 'A', md5('admin'));
-- added in 2.3

View File

@ -160,6 +160,8 @@ CREATE TABLE "cc_show"
"linked" BOOLEAN DEFAULT 'f' NOT NULL,
"is_linkable" BOOLEAN DEFAULT 't' NOT NULL,
"image_path" VARCHAR(255) DEFAULT '',
"has_autoplaylist" BOOLEAN DEFAULT 'f' NOT NULL,
"autoplaylist_id" INTEGER,
PRIMARY KEY ("id")
);
@ -184,6 +186,7 @@ CREATE TABLE "cc_show_instances"
"created" TIMESTAMP NOT NULL,
"last_scheduled" TIMESTAMP,
"modified_instance" BOOLEAN DEFAULT 'f' NOT NULL,
"autoplaylist_built" BOOLEAN DEFAULT 'f' NOT NULL,
PRIMARY KEY ("id")
);
@ -800,6 +803,11 @@ ALTER TABLE "cc_perms" ADD CONSTRAINT "cc_perms_subj_fkey"
REFERENCES "cc_subjs" ("id")
ON DELETE CASCADE;
ALTER TABLE "cc_show" ADD CONSTRAINT "cc_playlist_autoplaylist_fkey"
FOREIGN KEY ("autoplaylist_id")
REFERENCES "cc_playlist" ("id")
ON DELETE SET NULL;
ALTER TABLE "cc_show_instances" ADD CONSTRAINT "cc_show_fkey"
FOREIGN KEY ("show_id")
REFERENCES "cc_show" ("id")