This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
(...) | |
SYMBOL | |
NAME "bbpf_logo" | |
TYPE pixmap | |
IMAGE "bbpf.png" | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP file: | |
######### | |
LAYER | |
NAME "mapname" | |
STATUS DEFAULT | |
TYPE POINT | |
TRANSFORM ll | |
UNITS PIXELS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### PGSQL ### | |
create or replace view map_name as select id, name, now() as generated_date, st_GeomFromText('POINT(-5 70)') AS geom FROM map; | |
### MAPFILE ### | |
LAYER | |
NAME "mapname" | |
STATUS DEFAULT | |
TYPE POINT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jcigar@dev:~/ > pg_restore -d alienalert -O -x -t country_id_seq -t country nb.sql | |
pg_restore: [archiver (db)] Error while PROCESSING TOC: | |
pg_restore: [archiver (db)] Error from TOC entry 191; 1259 3251168 TABLE country jcigar | |
pg_restore: [archiver (db)] could not execute query: ERROR: relation "country_id_seq" does not exist | |
Command was: CREATE TABLE country ( | |
id integer DEFAULT nextval('country_id_seq'::regclass) NOT NULL, | |
name character varying(200) ... | |
pg_restore: [archiver (db)] Error from TOC entry 3663; 0 3251168 TABLE DATA country jcigar | |
pg_restore: [archiver (db)] could not execute query: ERROR: relation "country" does not exist | |
Command was: COPY country (id, name, iso_code) FROM stdin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
from sqlalchemy import * | |
from sqlalchemy.orm import * | |
from sqlalchemy.ext.declarative import declarative_base | |
Base= declarative_base() | |
pool_invites = Table( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table account ( | |
id serial not null, | |
constraint pk_account | |
primary key(id), | |
); | |
create table form ( | |
id serial not null, | |
account_id integer not null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pool_account_result_mapper = orm.mapper( | |
PoolAccountResult, | |
table['pool_invite_result'], | |
properties = { | |
'result' : orm.relationship(Result, | |
backref='pool_account_result_assoc'), | |
'pool' : orm.relationship( | |
Pool, | |
primaryjoin=sql.and_( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import cherrypy | |
from cherrypy._cpdispatch import Dispatcher | |
from sqlalchemy import sql | |
from amnesia import db | |
__all__ = ['AmnesiaDispatcher'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table account_role( | |
id serial not null, | |
account_id integer not null, | |
role_id integer not null, | |
pool_id integer, | |
constraint pk_account_role | |
primary key(id), | |
constraint fk_account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### | |
# ACCOUNT # | |
########### | |
orm.mapper(Account, table['account']) | |
######## | |
# POOL # | |
######## |
OlderNewer