This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
admin:basics:environments:deploy [2011/03/01 00:20] 127.0.0.1 external edit |
admin:basics:environments:deploy [2016/06/28 22:38] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
+ | |||
{{page>:top_add&nofooter&noeditbtn}} | {{page>:top_add&nofooter&noeditbtn}} | ||
Line 24: | Line 25: | ||
The following example uses relative paths, meaning that all file locations will be relative to the "current working directory". This allows the environment to be easily copied to different locations. | The following example uses relative paths, meaning that all file locations will be relative to the "current working directory". This allows the environment to be easily copied to different locations. | ||
- | <code sql> | + | <code> |
> create environment | > create environment | ||
>> in "simple.xml" | >> in "simple.xml" | ||
Line 32: | Line 33: | ||
> | > | ||
> create database "SIMPLE" | > create database "SIMPLE" | ||
- | >> type FLATFILE | + | >> type FILE |
>> index_directory "idx" | >> index_directory "idx" | ||
>> in "simple.xml"; | >> in "simple.xml"; | ||
Line 39: | Line 40: | ||
> | > | ||
> create table "HOUSEHOLDS" | > create table "HOUSEHOLDS" | ||
- | >> physical "dat\households.dat" | + | >> physical "dat/households.dat" |
>> ( | >> ( | ||
>> "HOUSEHOLD" CHARACTER(12) omnidex, | >> "HOUSEHOLD" CHARACTER(12) omnidex, | ||
Line 54: | Line 55: | ||
> | > | ||
> create table "INDIVIDUALS" | > create table "INDIVIDUALS" | ||
- | >> physical "dat\individuals.dat" | + | >> physical "dat/individuals.dat" |
>> ( | >> ( | ||
>> "INDIVIDUAL" CHARACTER(12) omnidex, | >> "INDIVIDUAL" CHARACTER(12) omnidex, | ||
Line 74: | Line 75: | ||
The following example uses an environment variable called "APPLICATION_HOME", meaning that all file locations will be relative to the directory contained in that environment variable. This also allows the environment to be easily copied to different locations and only requires that the environment variable be changed. | The following example uses an environment variable called "APPLICATION_HOME", meaning that all file locations will be relative to the directory contained in that environment variable. This also allows the environment to be easily copied to different locations and only requires that the environment variable be changed. | ||
- | <code sql> | + | <code> |
> create environment | > create environment | ||
- | >> in "{$APPLICATION_HOME\simple.xml}" | + | >> in "{$APPLICATION_HOME/simple.xml}" |
>> with delete; | >> with delete; | ||
Environment created in simple.xml | Environment created in simple.xml | ||
Line 82: | Line 83: | ||
> | > | ||
> create database "SIMPLE" | > create database "SIMPLE" | ||
- | >> type FLATFILE | + | >> type FILE |
- | >> index_directory "{$APPLICATION_HOME\idx}" | + | >> index_directory "{$APPLICATION_HOME/idx}" |
- | >> in "{$APPLICATION_HOME\simple.xml}"; | + | >> in "{$APPLICATION_HOME/simple.xml}"; |
Database SIMPLE created in simple.xml | Database SIMPLE created in simple.xml | ||
> | > | ||
> | > | ||
> create table "HOUSEHOLDS" | > create table "HOUSEHOLDS" | ||
- | >> physical "{$APPLICATION_HOME\dat\households.dat}" | + | >> physical "{$APPLICATION_HOME/dat/households.dat}" |
>> ( | >> ( | ||
>> "HOUSEHOLD" CHARACTER(12) omnidex, | >> "HOUSEHOLD" CHARACTER(12) omnidex, | ||
Line 99: | Line 100: | ||
>> constraint HOUSEHOLDS_HOUSEHOLD_PK primary ("HOUSEHOLD") | >> constraint HOUSEHOLDS_HOUSEHOLD_PK primary ("HOUSEHOLD") | ||
>> ) | >> ) | ||
- | >> in "{$APPLICATION_HOME\simple.xml}"; | + | >> in "{$APPLICATION_HOME/simple.xml}"; |
Table HOUSEHOLDS created in simple.xml | Table HOUSEHOLDS created in simple.xml | ||
> | > | ||
> | > | ||
> create table "INDIVIDUALS" | > create table "INDIVIDUALS" | ||
- | >> physical "{$APPLICATION_HOME\dat\individuals.dat}" | + | >> physical "{$APPLICATION_HOME/dat/individuals.dat}" |
>> ( | >> ( | ||
>> "INDIVIDUAL" CHARACTER(12) omnidex, | >> "INDIVIDUAL" CHARACTER(12) omnidex, | ||
Line 116: | Line 117: | ||
>> constraint INDIVIDUALS_HOUSEHOLD_FK foreign ("HOUSEHOLD") references "HOUSEHOLDS" | >> constraint INDIVIDUALS_HOUSEHOLD_FK foreign ("HOUSEHOLD") references "HOUSEHOLDS" | ||
>> ) | >> ) | ||
- | >> in "{$APPLICATION_HOME\simple.xml}"; | + | >> in "{$APPLICATION_HOME/simple.xml}"; |
Table INDIVIDUALS created in simple.xml | Table INDIVIDUALS created in simple.xml | ||
</code> | </code> |