X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/14ac1babc2517320a2c90fa9b4ac36a5a6e68018..df283287e69c7941e111072ec4a4ea83e48b76f6:/db/structure.sql diff --git a/db/structure.sql b/db/structure.sql index c287baea3..5d52a87be 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -45,8 +45,7 @@ SET search_path = public, pg_catalog; CREATE TYPE format_enum AS ENUM ( 'html', - 'markdown', - 'text' + 'markdown' ); @@ -126,7 +125,7 @@ CREATE TYPE user_status_enum AS ENUM ( CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer LANGUAGE c STRICT - AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'maptile_for_point'; + AS '/srv/www/next.osm.compton.nu/db/functions/libpgosm.so', 'maptile_for_point'; -- @@ -135,7 +134,7 @@ CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint LANGUAGE c STRICT - AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'tile_for_point'; + AS '/srv/www/next.osm.compton.nu/db/functions/libpgosm.so', 'tile_for_point'; -- @@ -143,8 +142,8 @@ CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint -- CREATE FUNCTION xid_to_int4(xid) RETURNS integer - LANGUAGE c STRICT - AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'xid_to_int4'; + LANGUAGE c IMMUTABLE STRICT + AS '/srv/www/next.osm.compton.nu/db/functions/libpgosm.so', 'xid_to_int4'; SET default_tablespace = ''; @@ -485,7 +484,7 @@ CREATE TABLE diary_comments ( created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, visible boolean DEFAULT true NOT NULL, - body_format format_enum DEFAULT 'html'::format_enum NOT NULL + body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL ); @@ -523,7 +522,7 @@ CREATE TABLE diary_entries ( longitude double precision, language_code character varying(255) DEFAULT 'en'::character varying NOT NULL, visible boolean DEFAULT true NOT NULL, - body_format format_enum DEFAULT 'html'::format_enum NOT NULL + body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL ); @@ -684,7 +683,7 @@ CREATE TABLE messages ( to_user_id bigint NOT NULL, to_user_visible boolean DEFAULT true NOT NULL, from_user_visible boolean DEFAULT true NOT NULL, - body_format format_enum DEFAULT 'html'::format_enum NOT NULL + body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL ); @@ -741,7 +740,7 @@ CREATE TABLE nodes ( -- CREATE TABLE note_comments ( - id bigint NOT NULL, + id integer NOT NULL, note_id bigint NOT NULL, visible boolean NOT NULL, created_at timestamp without time zone NOT NULL, @@ -776,7 +775,7 @@ ALTER SEQUENCE note_comments_id_seq OWNED BY note_comments.id; -- CREATE TABLE notes ( - id bigint NOT NULL, + id integer NOT NULL, latitude integer NOT NULL, longitude integer NOT NULL, tile bigint NOT NULL, @@ -894,8 +893,8 @@ CREATE TABLE redactions ( id integer NOT NULL, title character varying(255), description text, - created_at timestamp without time zone, - updated_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, user_id bigint NOT NULL, description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL ); @@ -983,7 +982,7 @@ CREATE TABLE user_blocks ( revoker_id bigint, created_at timestamp without time zone, updated_at timestamp without time zone, - reason_format format_enum DEFAULT 'html'::format_enum NOT NULL + reason_format format_enum DEFAULT 'markdown'::format_enum NOT NULL ); @@ -1110,8 +1109,8 @@ CREATE TABLE users ( openid_url character varying(255), preferred_editor character varying(255), terms_seen boolean DEFAULT false NOT NULL, - description_format format_enum DEFAULT 'html'::format_enum NOT NULL, image_fingerprint character varying(255), + description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL, changesets_count integer DEFAULT 0 NOT NULL, traces_count integer DEFAULT 0 NOT NULL, diary_entries_count integer DEFAULT 0 NOT NULL, @@ -1795,13 +1794,6 @@ CREATE INDEX gpx_files_user_id_idx ON gpx_files USING btree (user_id); CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility); --- --- Name: index_changeset_comments_on_body; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX index_changeset_comments_on_body ON changeset_comments USING btree (body); - - -- -- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -2548,6 +2540,10 @@ INSERT INTO schema_migrations (version) VALUES ('20140507110937'); INSERT INTO schema_migrations (version) VALUES ('20140519141742'); +INSERT INTO schema_migrations (version) VALUES ('20150110152606'); + +INSERT INTO schema_migrations (version) VALUES ('20150111192335'); + INSERT INTO schema_migrations (version) VALUES ('21'); INSERT INTO schema_migrations (version) VALUES ('22'); @@ -2635,3 +2631,4 @@ INSERT INTO schema_migrations (version) VALUES ('7'); INSERT INTO schema_migrations (version) VALUES ('8'); INSERT INTO schema_migrations (version) VALUES ('9'); +