CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.

This commit is contained in:
Paul Baranowski 2011-04-14 18:55:04 -04:00
parent 514777e8d2
commit b11cbd8159
4546 changed files with 138 additions and 51 deletions

View file

@ -0,0 +1,31 @@
# $Id: build.properties 1688 2010-04-19 20:23:27Z francois $
#
# This is a project-specific build.properties file. The properties
# in this file override anything set in Propel's top-level build.properties
# file when *this* project is being built.
#
# See top-level build.properties-sample for explanation of configuration
# options.
#
# Because this file is included before the top-level build.properties file,
# you cannot refer to any properties set therein.
propel.project = bookstore_namespaced
propel.database = mysql
propel.database.url = mysql:dbname=test
propel.mysqlTableType = InnoDB
propel.disableIdentifierQuoting=true
# For MySQL or Oracle, you also need to specify username & password
#propel.database.user = [db username]
#propel.database.password = [db password]
# Note that if you do not wish to specify the database (e.g. if you
# are using multiple databses) you can use the @DB@ token which
# will be replaced with a database at runtime.
# E.g.: propel.database.url = sqlite://localhost/./test/@DB@.db
# This will work for the datadump and the insert-sql tasks.
# propel.database.createUrl = (doesn't apply for SQLite, since db is auto-created)
propel.targetPackage = bookstore

View file

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<config>
<!--
#
# L O G G I N G
#
# We use PEAR-compatible Log for all Propel logging and we embed the
# log conf properties within our application configuration.
#
# type - the type of log (default 'file')
# name - the name of log or path to file. (default './propel.log')
# ident - the text used to identify the log messages
# level - the log level
# PEAR_LOG_EMERG 0
# PEAR_LOG_ALERT 1
# PEAR_LOG_CRIT 2
# PEAR_LOG_ERR 3
# PEAR_LOG_WARNING 4
# PEAR_LOG_NOTICE 5
# PEAR_LOG_INFO 6
# PEAR_LOG_DEBUG 7
#
# Note that if you omit the <log> config section, Propel will not attempt to
# configure a logger, and you will need to specify one manually using
# Propel::setLogger() if you want Propel to log debug or error messages.
-->
<log>
<ident>propel-bookstore</ident>
<name>propel.log</name>
<level>7</level>
</log>
<!--
#
# P R O P E L P R O P E R T I E S
#
# Note that you can configure multiple datasources; for example if your
# project uses several databases.
-->
<propel>
<datasources default="bookstore_namespaced">
<datasource id="bookstore_namespaced">
<!-- the Propel adapter to use for this connection -->
<adapter>mysql</adapter>
<!-- Connection parameters. See PDO documentation for DSN format and available option constants. -->
<connection>
<classname>DebugPDO</classname>
<dsn>mysql:dbname=test</dsn>
<!--
For MySQL and Oracle you must specify username + password separate from DSN:
<user>bookstore</user>
<password></password>
-->
<options>
<option id="ATTR_PERSISTENT">false</option>
</options>
<attributes>
<!--
For MySQL, you should also turn on prepared statement emulation,
as prepared statements support is buggy in mysql driver
-->
<option id="ATTR_EMULATE_PREPARES">true</option>
</attributes>
<settings>
<!-- Set the character set for client connection -->
<setting id="charset">utf8</setting>
<!-- you can also execute arbitrary queries after the connection is created
<setting id="queries">
<query>SELECT * FROM foo</query>
<query>INSERT INTO BAR ('hey', 'there')</query>
</setting>
-->
</settings>
</connection>
</datasource>
</datasources>
</propel>
</config>

View file

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<database name="bookstore_namespaced" defaultIdMethod="native"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../generator/resources/xsd/database.xsd">
<table name="book" description="Book Table" phpName="NamespacedBook" namespace="Foo\Bar">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" description="Book Id" />
<column name="title" type="VARCHAR" required="true" description="Book Title" primaryString="true" />
<column name="isbn" required="true" type="VARCHAR" size="24" phpName="ISBN" description="ISBN Number" />
<column name="price" required="false" type="FLOAT" description="Price of the book." />
<column name="publisher_id" required="false" type="INTEGER" description="Foreign Key Publisher" />
<column name="author_id" required="false" type="INTEGER" description="Foreign Key Author" />
<foreign-key foreignTable="publisher" onDelete="setnull">
<reference local="publisher_id" foreign="id" />
</foreign-key>
<foreign-key foreignTable="author" onDelete="setnull" onUpdate="cascade">
<reference local="author_id" foreign="id" />
</foreign-key>
<validator column="title" translate="none">
<rule name="unique" message="Book title already in database." />
<rule name="minLength" value="10" message="Book title must be more than ${value} characters long." />
<rule name="maxLength" value="255" message="Book title must not be longer than ${value} characters." />
</validator>
<validator column="isbn" translate="none">
<rule name="class" class="bookstore.validator.ISBNValidator" message="ISBN does not validate!"/>
</validator>
</table>
<table name="publisher" description="Publisher Table" phpName="NamespacedPublisher" namespace="Baz">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" description="Publisher Id" />
<column name="name" required="true" type="VARCHAR" size="128" default="Penguin" description="Publisher Name" />
</table>
<table name="author" description="Author Table" phpName="NamespacedAuthor">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" description="Author Id" />
<column name="first_name" required="true" type="VARCHAR" size="128" description="First Name" />
<column name="last_name" required="true" type="VARCHAR" size="128" description="Last Name" />
<column name="email" type="VARCHAR" size="128" description="E-Mail Address" />
<column name="age" type="INTEGER" description="The authors age" />
<validator column="last_name" translate="none">
<rule name="required" message="The last name field is required." />
</validator>
<validator column="email" translate="none">
<rule name="match" value="/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$/" message="Please enter a valid email address." />
</validator>
<validator column="age" translate="none">
<rule name="minValue" value="0" message="Please enter a positive number." />
<rule name="maxValue" value="100" message="Impressive age! Just kidding, hm?" />
</validator>
</table>
<!-- test many-to-many relationships -->
<table name="book_club_list" phpName="NamespacedBookClub" namespace="Baz">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
<column name="group_leader" required="true" type="VARCHAR" size="100" />
<column name="theme" required="false" type="VARCHAR" size="50" />
</table>
<table name="book_x_list" phpName="NamespacedBookListRel" isCrossRef="true">
<column name="book_id" primaryKey="true" type="INTEGER" />
<column name="book_club_list_id" primaryKey="true" type="INTEGER" />
<foreign-key foreignTable="book" onDelete="cascade">
<reference local="book_id" foreign="id" />
</foreign-key>
<foreign-key foreignTable="book_club_list" onDelete="cascade">
<reference local="book_club_list_id" foreign="id" />
</foreign-key>
</table>
<!-- test self-referencing foreign keys and inheritance-->
<table name="bookstore_employee" phpName="NamespacedBookstoreEmployee" namespace="Foo\Bar">
<column name="id" type="INTEGER" primaryKey="true" autoIncrement="true" />
<column name="class_key" type="INTEGER" required="true" default="0" inheritance="single">
<inheritance key="0" class="NamespacedBookstoreEmployee" />
<inheritance key="1" class="NamespacedBookstoreManager" extends="NamespacedBookstoreEmployee" />
<inheritance key="2" class="NamespacedBookstoreCashier" extends="NamespacedBookstoreEmployee" />
</column>
<column name="name" type="VARCHAR" size="32" />
<column name="job_title" type="VARCHAR" size="32" />
<column name="supervisor_id" type="INTEGER" />
<column name="photo" type="BLOB" lazyLoad="true" />
<foreign-key foreignTable="bookstore_employee" phpName="Supervisor" refPhpName="Subordinate" onDelete="setnull">
<reference local="supervisor_id" foreign="id" />
</foreign-key>
</table>
</database>