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 <?php
// This file generated by Propel 1.7.0 convert-conf target // 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 ( $conf = array (
'datasources' => 'datasources' =>
array ( array (

View File

@ -1,6 +1,6 @@
#Note: project.home is automatically generated by the propel-install script. #Note: project.home is automatically generated by the propel-install script.
#Any manual changes to this value will be overwritten. #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 project.build = ${project.home}/build
#Database driver #Database driver

View File

@ -154,6 +154,11 @@
<column name="image_path" phpName="DbImagePath" type="VARCHAR" size="255" required="false" defaultValue=""/> <column name="image_path" phpName="DbImagePath" type="VARCHAR" size="255" required="false" defaultValue=""/>
<!-- Fully qualified path for the image associated with this show. <!-- Fully qualified path for the image associated with this show.
Default is /path/to/stor/dir/:ownerId/show-images/:showId/imageName --> 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>
<table name="cc_show_instances" phpName="CcShowInstances"> <table name="cc_show_instances" phpName="CcShowInstances">
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <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 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. --> to ensure that we don't regenerate the instance. -->
<column name="modified_instance" phpName="DbModifiedInstance" type="BOOLEAN" required="true" defaultValue="false" /> <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"> <foreign-key foreignTable="cc_show" name="cc_show_fkey" onDelete="CASCADE">
<reference local="show_id" foreign="id"/> <reference local="show_id" foreign="id"/>
</foreign-key> </foreign-key>

View File

@ -1,5 +1,5 @@
-- Schema version -- 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')); INSERT INTO cc_subjs ("login", "type", "pass") VALUES ('admin', 'A', md5('admin'));
-- added in 2.3 -- added in 2.3

View File

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