         CONSTRAINT "old_refresh_token_requires_current_refresh_token"
           CHECK ("refresh_token" NOTNULL OR "old_refresh_token" ISNULL) );
 
-COMMENT ON TABLE "api_code_grant" IS 'PRELIMINARY, SUBJECT TO CHANGE! Issued OAuth2 authorization codes and refresh tokens';
-
-COMMENT ON COLUMN "api_code_grant"."validity_period"    IS 'Period after which no more refreshing is possible';
-COMMENT ON COLUMN "api_code_grant"."created"            IS 'Date/time when authorization code (or first refresh token when there is no authorization code) has been created';
-COMMENT ON COLUMN "api_code_grant"."authorization_code" IS 'OAuth2 authorization code (only valid for a very short time after it has been created)';
-COMMENT ON COLUMN "api_code_grant"."refreshed"          IS 'Date/time of last refresh';
-COMMENT ON COLUMN "api_code_grant"."refresh_token"      IS 'OAuth2 refresh token';
+COMMENT ON TABLE "authorized_client_token" IS 'PRELIMINARY, SUBJECT TO CHANGE! Issued OAuth2 authorization codes and refresh tokens';
+
+COMMENT ON COLUMN "authorized_client_token"."created"            IS 'Date/time when authorization code (or first refresh token when there is no authorization code) has been created';
+COMMENT ON COLUMN "authorized_client_token"."authorization_code" IS 'OAuth2 authorization code (only valid for a very short time after it has been created)';
+COMMENT ON COLUMN "authorized_client_token"."refreshed"          IS 'Date/time of last refresh';
+COMMENT ON COLUMN "authorized_client_token"."refresh_token"      IS 'OAuth2 refresh token';
+
+-- END OF NEW PRELIMINARY API TABLES --
 
 
 CREATE TABLE "member_history" (


COMMENT ON TABLE "member_application" IS 'DEPRECATED, WILL BE REMOVED! Registered application being allowed to use the API';


CREATE TYPE "api_access_level" AS ENUM (
  'none', 'anonymous', 'authors_pseudonymous', 'all_pseudonymous', 'everything', 'member' );

COMMENT ON COLUMN "member"."statement"            IS 'Freely chosen text of the member for his/her profile';


-- DEPRECATED API TABLES --

CREATE TYPE "application_access_level" AS ENUM
  ('member', 'full', 'pseudonymous', 'anonymous');

