Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 3.38 KB | None | 0 0
  1.                                      TABLE "public.carpool_tripoffer"
  2.           Column          |     TYPE     |                           Modifiers                            
  3. --------------------------+--------------+----------------------------------------------------------------
  4.  id                       | INTEGER      | NOT NULL DEFAULT NEXTVAL('carpool_tripoffer_id_seq'::regclass)
  5.  checkpoints              | text         | NOT NULL
  6.  radius                   | INTEGER      | NOT NULL
  7.  driver_km_price          | numeric(5,2) |
  8.  driver_smokers_accepted  | BOOLEAN      |
  9.  driver_pets_accepted     | BOOLEAN      |
  10.  driver_place_for_luggage | BOOLEAN      |
  11.  driver_car_type_id       | INTEGER      |
  12.  driver_seats_available   | INTEGER      |
  13.  route                    | geometry     | NOT NULL
  14.  simple_route             | geometry     | NOT NULL
  15.  direction_route          | geometry     | NOT NULL
  16.  simple_route_proj        | geometry     | NOT NULL
  17.  direction_route_proj     | geometry     | NOT NULL
  18. Indexes:
  19.     "carpool_tripoffer_pkey" PRIMARY KEY, btree (id)
  20.     "carpool_tripoffer_direction_route_id" gist (direction_route)
  21.     "carpool_tripoffer_direction_route_proj_id" gist (direction_route_proj)
  22.     "carpool_tripoffer_driver_car_type_id" btree (driver_car_type_id)
  23.     "carpool_tripoffer_route_id" gist (route)
  24.     "carpool_tripoffer_simple_route_id" gist (simple_route)
  25.     "carpool_tripoffer_simple_route_proj_id" gist (simple_route_proj)
  26. CHECK constraints:
  27.     "carpool_tripoffer_driver_seats_available_check" CHECK (driver_seats_available >= 0)
  28.     "carpool_tripoffer_radius_check" CHECK (radius >= 0)
  29.     "enforce_dims_direction_route" CHECK (st_ndims(direction_route) = 2)
  30.     "enforce_dims_direction_route_proj" CHECK (st_ndims(direction_route_proj) = 2)
  31.     "enforce_dims_route" CHECK (st_ndims(route) = 2)
  32.     "enforce_dims_simple_route" CHECK (st_ndims(simple_route) = 2)
  33.     "enforce_dims_simple_route_proj" CHECK (st_ndims(simple_route_proj) = 2)
  34.     "enforce_geotype_direction_route" CHECK (geometrytype(direction_route) = 'LINESTRING'::text OR direction_route IS NULL)
  35.     "enforce_geotype_direction_route_proj" CHECK (geometrytype(direction_route_proj) = 'LINESTRING'::text OR direction_route_proj IS NULL)
  36.     "enforce_geotype_route" CHECK (geometrytype(route) = 'MULTILINESTRING'::text OR route IS NULL)
  37.     "enforce_geotype_simple_route" CHECK (geometrytype(simple_route) = 'MULTILINESTRING'::text OR simple_route IS NULL)
  38.     "enforce_geotype_simple_route_proj" CHECK (geometrytype(simple_route_proj) = 'MULTILINESTRING'::text OR simple_route_proj IS NULL)
  39.     "enforce_srid_direction_route" CHECK (st_srid(direction_route) = 4326)
  40.     "enforce_srid_direction_route_proj" CHECK (st_srid(direction_route_proj) = 27572)
  41.     "enforce_srid_route" CHECK (st_srid(route) = 4326)
  42.     "enforce_srid_simple_route" CHECK (st_srid(simple_route) = 4326)
  43.     "enforce_srid_simple_route_proj" CHECK (st_srid(simple_route_proj) = 27572)
  44. Foreign-key constraints:
  45.     "carpool_tripoffer_driver_car_type_id_fkey" FOREIGN KEY (driver_car_type_id) REFERENCES carpool_cartype(id) DEFERRABLE INITIALLY DEFERRED
  46. Referenced BY:
  47.     TABLE "carpool_trip" CONSTRAINT "carpool_trip_offer_id_fkey" FOREIGN KEY (offer_id) REFERENCES carpool_tripoffer(id) DEFERRABLE INITIALLY DEFERRED
  48. Triggers:
  49.     proj_route BEFORE INSERT OR UPDATE ON carpool_tripoffer FOR EACH ROW EXECUTE PROCEDURE proj_route()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement