Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 3.07 KB | None | 0 0
  1. CREATE TABLE public.notifications_notification
  2. (
  3.   id INTEGER NOT NULL DEFAULT NEXTVAL('notifications_notification_id_seq'::regclass),
  4.   level CHARACTER VARYING(20) NOT NULL,
  5.   unread BOOLEAN NOT NULL,
  6.   actor_object_id CHARACTER VARYING(255) NOT NULL,
  7.   verb CHARACTER VARYING(255) NOT NULL,
  8.   description text,
  9.   target_object_id CHARACTER VARYING(255),
  10.   action_object_object_id CHARACTER VARYING(255),
  11.   "timestamp" TIMESTAMP WITH TIME zone NOT NULL,
  12.   public BOOLEAN NOT NULL,
  13.   action_object_content_type_id INTEGER,
  14.   actor_content_type_id INTEGER NOT NULL,
  15.   recipient_id INTEGER NOT NULL,
  16.   target_content_type_id INTEGER,
  17.   deleted BOOLEAN NOT NULL,
  18.   emailed BOOLEAN NOT NULL,
  19.   DATA text,
  20.   CONSTRAINT notifications_notification_pkey PRIMARY KEY (id),
  21.   CONSTRAINT notifications_notifi_action_object_conten_7d2b8ee9_fk_django_co FOREIGN KEY (action_object_content_type_id)
  22.       REFERENCES public.django_content_type (id) MATCH SIMPLE
  23.       ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
  24.   CONSTRAINT notifications_notifi_actor_content_type_i_0c69d7b7_fk_django_co FOREIGN KEY (actor_content_type_id)
  25.       REFERENCES public.django_content_type (id) MATCH SIMPLE
  26.       ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
  27.   CONSTRAINT notifications_notifi_recipient_id_d055f3f0_fk_auth_user FOREIGN KEY (recipient_id)
  28.       REFERENCES public.auth_user (id) MATCH SIMPLE
  29.       ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED,
  30.   CONSTRAINT notifications_notifi_target_content_type__ccb24d88_fk_django_co FOREIGN KEY (target_content_type_id)
  31.       REFERENCES public.django_content_type (id) MATCH SIMPLE
  32.       ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
  33. )
  34. WITH (
  35.   OIDS=FALSE
  36. );
  37. ALTER TABLE public.notifications_notification
  38.   OWNER TO oscar;
  39.  
  40. -- Index: public.notifications_notification_action_object_content_type_7d2b8ee9
  41.  
  42. -- DROP INDEX public.notifications_notification_action_object_content_type_7d2b8ee9;
  43.  
  44. CREATE INDEX notifications_notification_action_object_content_type_7d2b8ee9
  45.   ON public.notifications_notification
  46.   USING btree
  47.   (action_object_content_type_id);
  48.  
  49. -- Index: public.notifications_notification_actor_content_type_id_0c69d7b7
  50.  
  51. -- DROP INDEX public.notifications_notification_actor_content_type_id_0c69d7b7;
  52.  
  53. CREATE INDEX notifications_notification_actor_content_type_id_0c69d7b7
  54.   ON public.notifications_notification
  55.   USING btree
  56.   (actor_content_type_id);
  57.  
  58. -- Index: public.notifications_notification_recipient_id_d055f3f0
  59.  
  60. -- DROP INDEX public.notifications_notification_recipient_id_d055f3f0;
  61.  
  62. CREATE INDEX notifications_notification_recipient_id_d055f3f0
  63.   ON public.notifications_notification
  64.   USING btree
  65.   (recipient_id);
  66.  
  67. -- Index: public.notifications_notification_target_content_type_id_ccb24d88
  68.  
  69. -- DROP INDEX public.notifications_notification_target_content_type_id_ccb24d88;
  70.  
  71. CREATE INDEX notifications_notification_target_content_type_id_ccb24d88
  72.   ON public.notifications_notification
  73.   USING btree
  74.   (target_content_type_id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement