Skip to content

Commit

Permalink
refactor(authentication): 表名统一增加前缀防止重复
Browse files Browse the repository at this point in the history
  • Loading branch information
conifercone committed Feb 14, 2025
1 parent b38462f commit b9e0592
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -45,7 +45,7 @@
* @since 1.0.4
*/
@Entity
@Table(name = "users_archived")
@Table(name = "mumu_users_archived")
@Getter
@Setter
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,7 +47,7 @@
* @since 1.0.0
*/
@Entity
@Table(name = "users")
@Table(name = "mumu_users")
@Getter
@Setter
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,7 @@
@Getter
@Setter
@Entity
@Table(name = "permissions_archived")
@Table(name = "mumu_permissions_archived")
@DynamicInsert
public class PermissionArchivedPO extends JpaBasisArchivablePersistentObject {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,7 +39,7 @@
@Getter
@Setter
@Entity
@Table(name = "permissions")
@Table(name = "mumu_permissions")
@RequiredArgsConstructor
@DynamicInsert
public class PermissionPO extends JpaBasisArchivablePersistentObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@
@Getter
@Setter
@Entity
@Table(name = "user_roles")
@Table(name = "mumu_user_roles")
@DynamicInsert
@Metamodel
public class AccountRolePO extends JpaBasisDefaultPersistentObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,7 @@
@Getter
@Setter
@Entity
@Table(name = "permission_paths")
@Table(name = "mumu_permission_paths")
@DynamicInsert
@Metamodel
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,7 @@
@Getter
@Setter
@Entity
@Table(name = "role_paths")
@Table(name = "mumu_role_paths")
@DynamicInsert
@Metamodel
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@
@Getter
@Setter
@Entity
@Table(name = "role_permissions")
@Table(name = "mumu_role_permissions")
@DynamicInsert
@Metamodel
public class RolePermissionPO extends JpaBasisDefaultPersistentObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,7 @@
@Getter
@Setter
@Entity
@Table(name = "roles_archived")
@Table(name = "mumu_roles_archived")
@DynamicInsert
@Metamodel
public class RoleArchivedPO extends JpaBasisArchivablePersistentObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024-2024, the original author or authors.
* Copyright (c) 2024-2025, the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,7 +39,7 @@
@Getter
@Setter
@Entity
@Table(name = "roles")
@Table(name = "mumu_roles")
@DynamicInsert
@Metamodel
public class RolePO extends JpaBasisArchivablePersistentObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- @formatter:off
-- noinspection SqlConstantExpressionForFile
-- noinspection SqlResolveForFile
ALTER TABLE permission_paths RENAME TO mumu_permission_paths;
ALTER TABLE permissions RENAME TO mumu_permissions;
ALTER TABLE permissions_archived RENAME TO mumu_permissions_archived;
ALTER TABLE role_paths RENAME TO mumu_role_paths;
ALTER TABLE role_permissions RENAME TO mumu_role_permissions;
ALTER TABLE roles RENAME TO mumu_roles;
ALTER TABLE roles_archived RENAME TO mumu_roles_archived;
ALTER TABLE user_roles RENAME TO mumu_user_roles;
ALTER TABLE users RENAME TO mumu_users;
ALTER TABLE users_archived RENAME TO mumu_users_archived;

0 comments on commit b9e0592

Please sign in to comment.