FredericHeem/starhackit

View on GitHub
server/src/plugins/dbSchema/raml/db.schema.out.sample.json

Summary

Maintainability
Test Coverage
{
  "tables": {
    "group_permissions": {
      "table_schema": "public",
      "table_name": "group_permissions",
      "obj_description": null,
      "columns": {
        "group_id": {
          "table_schema": "public",
          "table_name": "group_permissions",
          "column_name": "group_id",
          "column_default": null,
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        },
        "permission_id": {
          "table_schema": "public",
          "table_name": "group_permissions",
          "column_name": "permission_id",
          "column_default": null,
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        }
      }
    },
    "groups": {
      "table_schema": "public",
      "table_name": "groups",
      "obj_description": null,
      "columns": {
        "id": {
          "table_schema": "public",
          "table_name": "groups",
          "column_name": "id",
          "column_default": "nextval('groups_id_seq'::regclass)",
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        },
        "name": {
          "table_schema": "public",
          "table_name": "groups",
          "column_name": "name",
          "column_default": null,
          "is_nullable": false,
          "data_type": "character varying",
          "col_description": null
        },
        "description": {
          "table_schema": "public",
          "table_name": "groups",
          "column_name": "description",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        }
      }
    },
    "password_resets": {
      "table_schema": "public",
      "table_name": "password_resets",
      "obj_description": null,
      "columns": {
        "id": {
          "table_schema": "public",
          "table_name": "password_resets",
          "column_name": "id",
          "column_default": "nextval('password_resets_id_seq'::regclass)",
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        },
        "token": {
          "table_schema": "public",
          "table_name": "password_resets",
          "column_name": "token",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        },
        "created_at": {
          "table_schema": "public",
          "table_name": "password_resets",
          "column_name": "created_at",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        },
        "updated_at": {
          "table_schema": "public",
          "table_name": "password_resets",
          "column_name": "updated_at",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        },
        "user_id": {
          "table_schema": "public",
          "table_name": "password_resets",
          "column_name": "user_id",
          "column_default": null,
          "is_nullable": true,
          "data_type": "uuid",
          "col_description": null
        }
      }
    },
    "permissions": {
      "table_schema": "public",
      "table_name": "permissions",
      "obj_description": null,
      "columns": {
        "id": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "id",
          "column_default": "nextval('permissions_id_seq'::regclass)",
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        },
        "name": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "name",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "resource": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "resource",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "description": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "description",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "POST": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "POST",
          "column_default": null,
          "is_nullable": true,
          "data_type": "boolean",
          "col_description": null
        },
        "GET": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "GET",
          "column_default": null,
          "is_nullable": true,
          "data_type": "boolean",
          "col_description": null
        },
        "PUT": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "PUT",
          "column_default": null,
          "is_nullable": true,
          "data_type": "boolean",
          "col_description": null
        },
        "PATCH": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "PATCH",
          "column_default": null,
          "is_nullable": true,
          "data_type": "boolean",
          "col_description": null
        },
        "DELETE": {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "DELETE",
          "column_default": null,
          "is_nullable": true,
          "data_type": "boolean",
          "col_description": null
        }
      }
    },
    "profile": {
      "table_schema": "public",
      "table_name": "profile",
      "obj_description": null,
      "columns": {
        "id": {
          "table_schema": "public",
          "table_name": "profile",
          "column_name": "id",
          "column_default": "nextval('profile_id_seq'::regclass)",
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        },
        "biography": {
          "table_schema": "public",
          "table_name": "profile",
          "column_name": "biography",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        },
        "user_id": {
          "table_schema": "public",
          "table_name": "profile",
          "column_name": "user_id",
          "column_default": null,
          "is_nullable": true,
          "data_type": "uuid",
          "col_description": null
        }
      }
    },
    "tickets": {
      "table_schema": "public",
      "table_name": "tickets",
      "obj_description": null,
      "columns": {
        "id": {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "id",
          "column_default": "nextval('tickets_id_seq'::regclass)",
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        },
        "subject": {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "subject",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "body": {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "body",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "created_at": {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "created_at",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        },
        "updatedAt": {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "updatedAt",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        },
        "user_id": {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "user_id",
          "column_default": null,
          "is_nullable": true,
          "data_type": "uuid",
          "col_description": null
        }
      }
    },
    "user_groups": {
      "table_schema": "public",
      "table_name": "user_groups",
      "obj_description": null,
      "columns": {
        "name": {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "name",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "user_id": {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "user_id",
          "column_default": null,
          "is_nullable": false,
          "data_type": "uuid",
          "col_description": null
        },
        "group_id": {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "group_id",
          "column_default": null,
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        }
      }
    },
    "user_pendings": {
      "table_schema": "public",
      "table_name": "user_pendings",
      "obj_description": null,
      "columns": {
        "id": {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "id",
          "column_default": "nextval('user_pendings_id_seq'::regclass)",
          "is_nullable": false,
          "data_type": "integer",
          "col_description": null
        },
        "username": {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "username",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        },
        "email": {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "email",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        },
        "password_hash": {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "password_hash",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        },
        "code": {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "code",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "created_at": {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "created_at",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        },
        "updatedAt": {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "updatedAt",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        }
      }
    },
    "users": {
      "table_schema": "public",
      "table_name": "users",
      "obj_description": null,
      "columns": {
        "id": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "id",
          "column_default": null,
          "is_nullable": false,
          "data_type": "uuid",
          "col_description": null
        },
        "username": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "username",
          "column_default": null,
          "is_nullable": false,
          "data_type": "character varying",
          "col_description": null
        },
        "email": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "email",
          "column_default": null,
          "is_nullable": false,
          "data_type": "character varying",
          "col_description": null
        },
        "first_name": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "first_name",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        },
        "last_name": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "last_name",
          "column_default": null,
          "is_nullable": true,
          "data_type": "character varying",
          "col_description": null
        },
        "password_hash": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "password_hash",
          "column_default": null,
          "is_nullable": true,
          "data_type": "text",
          "col_description": null
        },
        "created_at": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "created_at",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        },
        "updatedAt": {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "updatedAt",
          "column_default": null,
          "is_nullable": false,
          "data_type": "timestamp with time zone",
          "col_description": null
        }
      }
    }
  },
  "constraints": {
    "password_resets": {
      "user_id": [
        {
          "table_schema": "public",
          "table_name": "password_resets",
          "column_name": "user_id",
          "constraint_schema": "public",
          "constraint_name": "password_resets_user_id_fkey",
          "constraint_type": "FOREIGN KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "users",
          "referenced_column": "id"
        }
      ],
      "id": [
        {
          "table_schema": "public",
          "table_name": "password_resets",
          "column_name": "id",
          "constraint_schema": "public",
          "constraint_name": "password_resets_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "password_resets",
          "referenced_column": "id"
        }
      ]
    },
    "permissions": {
      "id": [
        {
          "table_schema": "public",
          "table_name": "permissions",
          "column_name": "id",
          "constraint_schema": "public",
          "constraint_name": "permissions_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "permissions",
          "referenced_column": "id"
        }
      ]
    },
    "profile": {
      "user_id": [
        {
          "table_schema": "public",
          "table_name": "profile",
          "column_name": "user_id",
          "constraint_schema": "public",
          "constraint_name": "profile_user_id_fkey",
          "constraint_type": "FOREIGN KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "users",
          "referenced_column": "id"
        }
      ],
      "id": [
        {
          "table_schema": "public",
          "table_name": "profile",
          "column_name": "id",
          "constraint_schema": "public",
          "constraint_name": "profile_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "profile",
          "referenced_column": "id"
        }
      ]
    },
    "tickets": {
      "user_id": [
        {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "user_id",
          "constraint_schema": "public",
          "constraint_name": "tickets_user_id_fkey",
          "constraint_type": "FOREIGN KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "users",
          "referenced_column": "id"
        }
      ],
      "id": [
        {
          "table_schema": "public",
          "table_name": "tickets",
          "column_name": "id",
          "constraint_schema": "public",
          "constraint_name": "tickets_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "tickets",
          "referenced_column": "id"
        }
      ]
    },
    "user_groups": {
      "user_id": [
        {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "user_id",
          "constraint_schema": "public",
          "constraint_name": "user_groups_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "user_groups",
          "referenced_column": "user_id"
        },
        {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "user_id",
          "constraint_schema": "public",
          "constraint_name": "user_groups_user_id_fkey",
          "constraint_type": "FOREIGN KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "users",
          "referenced_column": "id"
        },
        {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "user_id",
          "constraint_schema": "public",
          "constraint_name": "user_groups_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "user_groups",
          "referenced_column": "group_id"
        }
      ],
      "group_id": [
        {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "group_id",
          "constraint_schema": "public",
          "constraint_name": "user_groups_group_id_fkey",
          "constraint_type": "FOREIGN KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "groups",
          "referenced_column": "id"
        },
        {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "group_id",
          "constraint_schema": "public",
          "constraint_name": "user_groups_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "user_groups",
          "referenced_column": "group_id"
        },
        {
          "table_schema": "public",
          "table_name": "user_groups",
          "column_name": "group_id",
          "constraint_schema": "public",
          "constraint_name": "user_groups_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "user_groups",
          "referenced_column": "user_id"
        }
      ]
    },
    "user_pendings": {
      "id": [
        {
          "table_schema": "public",
          "table_name": "user_pendings",
          "column_name": "id",
          "constraint_schema": "public",
          "constraint_name": "user_pendings_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "user_pendings",
          "referenced_column": "id"
        }
      ]
    },
    "users": {
      "email": [
        {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "email",
          "constraint_schema": "public",
          "constraint_name": "users_email_key",
          "constraint_type": "UNIQUE",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "users",
          "referenced_column": "email"
        }
      ],
      "username": [
        {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "username",
          "constraint_schema": "public",
          "constraint_name": "users_username_key",
          "constraint_type": "UNIQUE",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "users",
          "referenced_column": "username"
        }
      ],
      "id": [
        {
          "table_schema": "public",
          "table_name": "users",
          "column_name": "id",
          "constraint_schema": "public",
          "constraint_name": "users_pkey",
          "constraint_type": "PRIMARY KEY",
          "check_clause": null,
          "referenced_schema": "public",
          "referenced_table": "users",
          "referenced_column": "id"
        }
      ]
    }
  },
  "sequences": {
    "password_resets": {
      "id": {
        "table_schema": "public",
        "table_name": "user_pendings",
        "column_name": "id",
        "sequence_name": "user_pendings_id_seq",
        "start_value": "1",
        "minimum_value": "1",
        "increment": "1"
      }
    },

    "user_pendings": {
      "id": {
        "table_schema": "public",
        "table_name": "user_pendings",
        "column_name": "id",
        "sequence_name": "user_pendings_id_seq",
        "start_value": "1",
        "minimum_value": "1",
        "increment": "1"
      }
    }
  }
}